Skip to content
Home » Blog » How to get image size dynamically

How to get image size dynamically

There are many times you wonder why the w3c validation is not going through for you. Please make sure that the img tag has the width and height attributes. What will happen if the image file comes dynamically and you do not know the width and height attribute, in that case try this “getimagesize”.

Below is the example that you can use to get the image size dynamcially.

{code type=PHP}

Leave a Reply

Your email address will not be published. Required fields are marked *