Jump to content

If statement based on image size


nugz17

Recommended Posts

Hi everyone i am a newbie,  so sorry if this is the wrong area.

 

I am just starting out with php and have a script that displays images that i have put into  a certain folder on  my website in a webpage at a certain size.

 

Now what i cant figure out is how to figure out the width of the image or images in the folder.  I need a if statement to basically check to see if the width of the image is "2000px" if it is run the working code i have and if it is a width of 2633px to run the other code i have working.  Any other image size shouldn't be displayed. 

 

I basically have two pages working one for horizontal and one for vertical images i really want to merge the two together.

 

Any help would be appreciated.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/159919-if-statement-based-on-image-size/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.