I'm using Drupal 7, and I have a content type that always has one image associated with it (from an image upload field), and I'm wanting to consistently display the width and height of the image when someone views the node.

My question is this: is image_get_info a cheap enough function call that I should just go ahead and call it every single time I display one of these nodes... or should I call image_get_info just once when the node is saved, and then store the width and height values in a field somewhere, and grab the values on node_load?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.