Commits

sharky93 committed 9569b29

docs for image resize in the moinwiki markup

  • Participants
  • Parent commits 99ecf78

Comments (0)

Files changed (1)

File docs/user/moinwiki.rst

 +---------------------------------------------------+---------------------------------------+
 | ``{{/SubItem}}``                                  | Transclude SubItem inline.            |
 +---------------------------------------------------+---------------------------------------+
+| ``{{ example.jpg || width=20, height=100 }}``     | Resizes example.png by using HTML     |
+|                                                   | tag attributes                        |
++---------------------------------------------------+---------------------------------------+
+| ``{{ example.jpg || &w=20 }}``                    | Resizes example.png by using server-  |
+|                                                   | side compression, PIL needs to be     |
+|                                                   | installed.                            |
++---------------------------------------------------+---------------------------------------+
+| ``{{ http://moinmo.in/ || width=20 }}``           | Resizes the ``object`` which is embe- |
+|                                                   | dded using HTML tags. Also markup     |
+|                                                   | involving '&' parameters like ``&w``  |
+|                                                   | doesn't make much sense.              |
++---------------------------------------------------+---------------------------------------+
+
+**Extra Info**: 
+
+The markup of ``{{ example.jpg || &w=20 }}``, simply adds ``&w`` to the ``src`` URL of the image, the Python Imaging Library (PIL)
+understands that it has to compress the image on the server side and render as shrinked to size ``20``. 
+
+For markup like ``{{ example.jpg || width=20, height=100 }}`` we currently allow only the ``width`` and ``height`` (anything 
+else is ignored) to be added as attributes in the HTML, however one can, add anything to the query URL using ``&``, like ``&w`` in the example above.
+
 
 Blockquotes and Indentations
 ============================