none
How to get image dimensions from web site images?

    Question

  • I am creating a web site and want to replace some of the images I have there now. Do I need for the new images to be the exact same dimensions as the existing ones? 

    If so, where would I get the dimensions? I brought one of the images into photoshop and I could read the dimensions but they did not seem right. 

    Thanks

    Monday, January 7, 2019 2:24 AM

Answers

  • You need to have the images be the same size as the existing ones only if you want them to display as the same size, and don't want to distort them by asking the browser to resize them to the original image dimensions.

    If Photoshop told you the dimensions, they were correct.  Why did you think they were not right?  One possibility is that you are already telling the browser to resize the images, so they don't look like the actual size to you.

    Look at your <img> tags.  Do they have height and width attributes?  If so do those numbers match the actual size of the image?  If they don't match, you are already asking the browser to resize the image.


    Kathleen Wilber
    BrightWillow - Asp.Net Applications

    • Marked as answer by wilmath Tuesday, January 8, 2019 1:19 AM
    Monday, January 7, 2019 4:43 AM

All replies

  • You need to have the images be the same size as the existing ones only if you want them to display as the same size, and don't want to distort them by asking the browser to resize them to the original image dimensions.

    If Photoshop told you the dimensions, they were correct.  Why did you think they were not right?  One possibility is that you are already telling the browser to resize the images, so they don't look like the actual size to you.

    Look at your <img> tags.  Do they have height and width attributes?  If so do those numbers match the actual size of the image?  If they don't match, you are already asking the browser to resize the image.


    Kathleen Wilber
    BrightWillow - Asp.Net Applications

    • Marked as answer by wilmath Tuesday, January 8, 2019 1:19 AM
    Monday, January 7, 2019 4:43 AM
  • The dimensions I got from Photoshop seemed much smaller than what I remember. I thought I created images about 3x4 inches but Photoshop said the dimensions were 1.2x1.7 inches. 

    I figured out how to get the dimensions from the images on the site. I wanted to know because I am working in Autcad and can scale the images to whatever size I need and don't want to have to squash them again unnecessarily. 

    Thanks for Your Help!

    I wish Expression Web was more popular. 

    Tuesday, January 8, 2019 1:09 AM