Images in blog entries

65 views
Skip to first unread message

Juan Riquelme

unread,
Apr 11, 2015, 1:57:27 PM4/11/15
to nikola-...@googlegroups.com
I'm trying to generate my blog, but I can't figure out how can I get my images in my blog entries.
I read the documentation and it says that, for get a figure (or image) directive behavior, I need to use the nikola thumbnail directive. So I do in my blog post, for example:

.. thumbnail:: /images/2013/12/2013-12-28_1.png
   
:alt: Python verde (Morelia Viridis).

   
Pitón arborícola verde (Morelia Viridis). Foto de `Marie`_, con unos toquecitos. `Original`_.

And I get only a broken image placeholder. It generates this code:

<div class="figure">
<a class="reference external image-reference" href="images/2013/12/2013-12-28_1.png"><img alt="Python verde (Morelia Viridis)." src="images/2013/12/2013-12-28_1.thumbnail.png"></a>
<p class="caption">Pitón arborícola verde (Morelia Viridis). Foto de <a class="reference external" href="http://www.flickr.com/photos/lesmontsdore/">Marie</a>, con unos toquecitos. <a class="reference external" href="http://www.flickr.com/photos/lesmontsdore/5513104816/">Original</a>.</p>
</div>

And, if I click, I get a lightbox with the full size image... I want it to:

1- Really generate that thumbnail if it insist in creating it. And show it.
2- If not, deactivate that thumbnail creation thing and, simply, show the full size image.

In my image related config, I only got:

IMAGE_FOLDERS = {'images': ''}
# IMAGE_THUMBNAIL_SIZE = 400

Remove comment character or not, the result is the same.

And, obviously, I have my images folder in files folder, and it gets copied to the root of the site.

I don't get it. I really don't care about that lightbox, thumbnails... I only want to show the images I want in an entry. Can you help me?

Thanks for your time.

Chris Warrick

unread,
Apr 11, 2015, 2:36:33 PM4/11/15
to Nikola—Discuss

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You should set IMAGE_FOLDERS to

IMAGE_FOLDERS = {'images': 'images'}

and put the images folder in the site root (not in files/)

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

Juan Riquelme

unread,
Apr 13, 2015, 6:21:54 AM4/13/15
to nikola-...@googlegroups.com
It works now. Thanks!
Reply all
Reply to author
Forward
0 new messages