Jump to content

Pageimage mime type


The G
 Share

Recommended Posts

Hello!

I am wondering if the mime type of a Pageimage exists somewhere in the object. The only ways I could think of for getting the mime type are using PHP GD functions

getimagesize($img->filename)['mime']

 

or, to pass around integer constants rather than string variables

image_type_to_mime_type(getimagesize($img->filename)[2])

 

or

image_type_to_mime_type((new ImageSizer($img->filename))->getImageType())

 

although I don't see the point in instantiating an ImageSizer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...