Does anyone know how to use phpthumbof with the gallerific plugin?
It’s working for the little images used as preview, but I’ve no idea how to use it for the big main pictures itself..
I also found that the caching creates files in /core/cache/phpthumbof folder for gallery items, but they are never used.
Thanks for this tip!
Did we arrive at an answer yet?
Are we all doing something wrong, or is this a bug?
thats a pity gallery can’t use files directly.
the difference:
with bare gallery:
<img class="" src="/assets/components/gallery/connector.php?action=web/phpthumb&w=100&h=100&zc=1&far=C&q=90&src=http%3A%2F%2Fmodx2.frischnetz.de%2Fassets%2Fcomponents%2Fgallery%2Ffiles%2F3%2F44.jpg" alt="img_9717.jpg">
with phpthumbof:
<img class="" src="/assets/components/phpthumbof/cache/_assets_components_gallery_files_3_44.jpg.05dda00f0de4d0a2611fe64d7fcf77f6.png" alt="img_9717.jpg">
of course there is a HUGE difference. in case of phpthumbof the webserver serves the static file directly and this gives the performance you would expect from "cache". The bare gallery does a PHP request and depending on how well your php is configured eg, as a module or standalone, webserver config etc. it could be anywhere between OK to slow in terms of performance. it does not matter if PHP requests the static file from cache via or not (OK, well it makes it a lot faster than calling imagemagick every time of course...) it is still running PHP and it will always be a lot slower than calling a static file directly. And with the fast proxy front ends like nginx the static files are served at a blistering speed.
So phpthumbof it is for me anyway...
I haven’t studied the code properly but I dont like the phpthumb&w=100&h=100&zc=1 in the url either - size should be already predetermined if it is cached no? is there another dynamic sizing operation going on or something...
and another big problem is that browsers don’t cache dynamic link like gallery outputs for thumbnails. so every time you reload the page it requests the thumbnails from the server - talking of bringing servers to their knees.
I wish I had time to look into more detail right now..
OK, now I understand a little more. So the files are indeed cached, but still served by a script, instead of linked directly. Good to know. It’s not as worse as directly resizing them, but can still cause timeouts on slower servers or cheap webhosting.
Would be great if the phpthumbof-way could somehow be hardwired into gallery’s gearbox...
Thanks!
Jörg
-
☆ A M B ☆
- 91 Posts
I don’t experience the "squashing" problem with the phpthumb method. Make sure you don’t have width and height automatically set for the images: e.g. don’t do
<img src="phpthumbcode" width="400" height="300" />
If that’s not the problem, can you paste your gallery template code and/ or the generated URL? You can also add zoomcropping:
http://rtfm.modx.com/display/ADDON/phpThumbOf
WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area
Ah i think I have the width and height set in the HTML, i’ll double check but reckon thats the issue. Thanks