How to get real URL of thumbnails (and not /zp-core/i.php?...)

drewy Member
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! :)

Comments

  • acrylian Administrator, Developer
    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.
  • So, the solution is to precache the images.
  • drewy Member
    > 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?
  • acrylian Administrator, Developer
    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.
Sign In or Register to comment.