Member
Member
drewy   02-03-2008, 15:35
#1

Hi there

For my album I would like to get the image URL of a thumbnail. If I use the getCustomAlbumThumb() function, I might get this URL if the thumb is already generated, but for new thumbnails I will get a URL like "/zp-core/i.php?a=..." that will generate the thumbnail when called in a browser.

However, I need to get the real image URL (because my code wants to further process the image, which does not work when I give it the i.php URL). Do you have any ideas how to accomplish that?

I need some function like: "If the thumbnail of album X does not exist, generate it. Then give me the URL to the generated JPG file."

Thank you! :)

Administrator
Administrator
acrylian   02-03-2008, 19:23
#2

Well the first part "f the thumbnail of album X does not exist, generate it." is exactly how zenphoto works. Take a look at your cache folder, you can directly link to images there if they have already been cached.

Member
Member
sbillard   02-03-2008, 19:39
#3

So, the solution is to precache the images.

Member
Member
drewy   02-03-2008, 21:27
#4

So, the solution is to precache the images.

That is exactly what I want ZenPhoto to do for me automatically without any action of me. :-) How can I achieve this?

Administrator
Administrator
acrylian   02-03-2008, 21:59
#5

We have buttons for caching in the admin, one for the complete gallery and additional ones for each album. And a user posted a shell script for that on the forum today, too.

If you don't want to use that, an uncached image is cache whenever a visitor first visits it on your site.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.