GetSimple Support Forum
Auto resize and cache content images - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: Auto resize and cache content images (/showthread.php?tid=5102)



Auto resize and cache content images - retrofan - 2013-08-23

Hi,
I make a GetSimple driven site, for a non-profit organisation (care of disabled) in my town. Some of the people there are able to handle the backend and take care of the contents, but it seems not to be possible to teach them how to prepare the images. They still upload 4000x2500 pixel - lots of megabytes photos, resize them to 320x200 in content editor and then call me "the page is loading sooo slow..." Tongue

I tried this one: https://github.com/will-in-wi/getsimple-image-resize-filter
But it not really works, or I am not clever enough to integrate it correctly?

Is there a working plugin, which generates a resized version of an image, the first time the image is displayed (in its final, user specified size), caches it and the next time the already, real resized, cached version will be delivered.

In other, bigger projects I mostly use MODX-CMS, which does those things. But in this case, MODX ist much to oversized for the project. And I love GetSimple, so there must be a solution... please...

Thanks for any hint!



Small Update
The plugin (https://github.com/will-in-wi/getsimple-image-resize-filter) works now. But its not perfect: It really changes the image-link in the content. After clearing the cache the image is gone and you have to put all images back by hand. Is there a better solution?


RE: Auto resize and cache content images - Carlos - 2013-08-23

Several of mvlcek's plugins have a nice image resizer (.../browser/pic.php, license: GPLv3) that caches thumbnails. You can use it like this (for example if you use I18N Custom Fields' one):
<img src="SITE/plugins/i18n_customfields/pic.php?p=imagefile.jpg&w=320&h=200" />


RE: Auto resize and cache content images - retrofan - 2013-08-23

(2013-08-23, 18:44:09)Carlos Wrote: Several of mvlcek's plugins have a nice image resizer (.../browser/pic.php, license: GPLv3) that caches thumbnails. You can use it like this (for example if you use I18N Custom Fields' one):
<img src="SITE/plugins/i18n_customfields/pic.php?p=imagefile.jpg&w=320&h=200" />

Hi, and thanks. That seems very good. But my problem is to get this DAU-proof, if you understand what I mean... The later authors of the page are able to use the wysiwyg editor, they are afraid of any source code. Is there a chance to implement a button in the wysiwyg editor which includes a link like your example (after selecting an image like the default-image include button does)?


RE: Auto resize and cache content images - Carlos - 2013-08-23

Oh, sorry, I read your post too quickly.


RE: Auto resize and cache content images - Carlos - 2013-08-23

These may be useful:

Imagizer plugin:
http://get-simple.info/extend/plugin/imagizer/320/

Another one:
https://github.com/will-in-wi/getsimple-image-resize-filter
(via http://get-simple.info/forums/showthread.php?tid=3229&pid=25331#pid25331 )


RE: Auto resize and cache content images - lesh - 2013-08-23

Would Imagizer (in the repository) help, It shrinks uploaded images to a standard size and makes thumbnail?
I use it as a standard plugin on my sites.

Lesh


RE: Auto resize and cache content images - retrofan - 2013-08-23

(2013-08-23, 19:37:04)Carlos Wrote: Imagizer plugin:
http://get-simple.info/extend/plugin/imagizer/320/

Yes! Thanks, thats useful!!

(2013-08-23, 19:37:04)Carlos Wrote: https://github.com/will-in-wi/getsimple-image-resize-filter
(via http://get-simple.info/forums/showthread.php?tid=3229&pid=25331#pid25331 )

I already have this one running (See my first posting). Its not perfect, but it helps.

I think imagizer is the best idea. This also prevents excessive use of webspace.

Also, thanks to lesh for the second imagizer hint!