More Resizing Options? - On the fly resizing?

Hi all,

Is it possible to have some more resizing options with Zenphoto? I want to have resize options on all of my photos; such as full size, 1024x768, 800x600 etc by clicking on a button, much like what Pbase does. This is for the purpose of easily resizing an image which can be forum friendly in size to hotlink.

Many thanks

Comments

  • acrylian Administrator, Developer
    There is a plugin for viewer size images. There are also custom size image function you can add to your theme. Please see the documentation. You will have to modify your theme for this.

    Also you can access the image proccessor directly. see `zp-core/i.php` for it's options.
  • Hi acrylian,

    Thanks for the very quick reply.

    The viewer size image does seem to work, however is it a suitable method to use for long term hotlinking? I want to ensure the path and filenames do not change over time. I noticed that if I copy and paste the resized url image link that the image is first processed via the i.php first and then the result is placed in the the cached directory.

    Could you point me to the documentation for the custom size functions?

    Many thanks
  • Viewer sized image would NOT be appropriate for cross linking as it is supported by javascript on the browser and therefore not a direct link to the image.

    You will have to make custom links to the sized images you want to provide. The documentation of customsized image should be a start. The details of the parameters will be in the i.php script file header.

    Your note of the i.php step is an important consideration. Zenphoto works by not creating sized images until they are requested. So initially links to an image of a particular size will be to i.php. Once the cache has been populated the link will be to the cache file. Unfortunately, if you pass on the i.php link to the external site, it will not get updated to the cachefile link. The image is not actually processed again as i.php will note that the cache file exists. Still you will have the script overhead. Off hand I know of no convenient means around this. You would have to cache all possible image/sizes before propegating the links.
  • In a round about way are you saying that it is not advisable to use Zenphoto in this way?

    I do feel a little uneasy using images for permanent hotlinking purposes which are coming from a cache folder.

    I have looked at the customsized documentation and I'm afraid that I can't make sense of it. I would find it much easier to understand if there were examples of how use the parameters in a URL.

    Do you know how the likes of Pbase manage to handle this feature?

    Many thanks
  • acrylian Administrator, Developer
    I don't know what Pbase is at all. The comment at the beginning of the file `zp-core/i.php` tells you everything about the image parameters.

    Resized images are always stored in the cached folder with Zenphoto.
  • I can understand you not wanting to permanantly link to the cache image--it could go away if you purge the cache. The only reliable link would be one to i.php. But you cannot also count on such a link being generated by any of the Zenphoto functions, since they will link to the cache if that file exists when they are generated.

    You would have to manually construct the i.php link. Obviously, for that you will have to gain understanding of its parameters.
Sign In or Register to comment.