2011-05-13, 15:54:05
Cerulean Wrote:If there is the ability to upload within the editor, then I'm not sure whether it is best to resize the files as they are uploaded, or to apply a resizing script to the editor output. By that I mean, instead of having the editor output the code
it would outputCode:<img src="path/to/image.jpg" style="width: 216px; height: 144px;" />
and use a resizing script such as SLIR: http://code.google.com/p/smart-lencioni-...wiki/UsageCode:<img src="/slir/w216-h144/path/to/image.jpg" />
This second option would be more difficult to implement because you would have to parse the output of the editor when the "Save Updates" button is clicked, but it would be a powerful feature.
The I18N Gallery plugin already uses an approach like this: it resizes the image on first access and caches it in the thumbs directory, e.g.
Code:
<img src="http://my.site/plugins/i18n_gallery/browser/pic.php?p=myimage.jpg&w=200&h=150" alt=""/>