I use imagecache_create_path () and getimagesize () to get the path to the imagecache image and its size. However, if this is the first time we access the page, the image does not exist yet, and imagecache_create_path does not generate it either.
Here is the code:
$small_image_path = imagecache_create_path('gallery_image_small', $image["filepath"]);
$data_small = list($width, $height, $type, $image_attributes) = @getimagesize($small_image_path);
Is there any API method to get the path AND generate the file? In other words, can I generate an image (using a preset) from PHP without showing it in the browser?
Thank you in advance
source
share