Is it possible to get the width and height of a cover image?

Dear all,

I’m working on a plugin. Because the uploaded cover image (e.g. of an article) has no guaranteed size I would like the plugin to act in response to the actual size of the cover image.

As far as I can see you can get the filename of the cover from the article object. The cover image is located in the public file folder and should not be accessible from the plugin, for security reasons. So I can’t just call getimagesize() within the plugin.

Is there another way to get the size of an cover image I am missing?

Best regards,
Markus

Hi @MarHerUMR,

I think the image dimensions should already be stored in the setting object. (At least that’s the case for e.g. the journal logo image; I haven’t checked specifically with article covers.)

Regards,
Alec Smecher
Public Knowledge Project Team