Closed (fixed)
Project:
ImageCache
Version:
6.x-2.0-beta12
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2011 at 16:03 UTC
Updated:
16 Aug 2011 at 16:58 UTC
We're doing some things with .getJSON and a custom Drupal module. It's important that we know an image's height before we print any HTML. To do this, we call
$image = imageapi_image_open($path); // The imagecache PRESET path, not the original!
$height = $image->info['height'];
It works like a charm — unless the image is new. If it's new, and imagecache hasn't yet created - the height comes back as 0. This results in a collapsed DIV in our output and a whole heap of problems.
Is there a way to force imagecache to do its work on request, rather than having to request the altered image in the browser?
Thanks!
Comments
Comment #1
sandrewj commentedwith the original image path.