Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does image scale not work in reStructuredText when generating html files?

I use reStructuredText to generate my static blog web pages. And I use the command below to include an image:

.. image:: /images/01.jpg
   :scale: 50
   :align: center 

However, the image displayed on my blog web page remain the same size as the original image. Seems that the scale option does not work. So, how to solve this problem?

like image 533
injoy Avatar asked Sep 06 '12 09:09

injoy


1 Answers

For the scale option to work, the generator needs to know the size of the image. So, you either need to define the size explicitly with width and height (well, not the solution we're looking for), or you need to install the Python Imaging Library to let the converter identify the image size automatically.

Reference: reStructuredText specification.

like image 95
Timur Avatar answered Oct 23 '22 02:10

Timur