The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. Sitespeed: Do images require width and height attributes?

    Sitespeed: Do images require width and height attributes?

    Intermediate & Advanced SEO
    8 3 1.3k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cyberlicious
      cyberlicious last edited by

      Currently working on a sitespeed issue, and was wondering if not having width and height for images actually do cause a problem.  We simply Photoshop the resolution we require for the image and add it to the page as is.  I though this would actually speed it up, but I am getting from www.gtmetrix.com that we should have them.

      What's your experience?  Thanks!

      1 Reply Last reply Reply Quote 0
      • ThompsonPaul
        ThompsonPaul last edited by

        The main reason PageSpeed and YSlow recommend including width and height for images is as much the perception of page speed as the actual load time, Ben.

        When you include the image dimensions, the browser can draw out the "containers" that will hold the images, reserving the space for them while they download. The browser can then go on the paint the rest of the pages CSS and objects around those "containers" without having to go back and redraw the whole page once the images have downloaded and their sizes are then known.

        This gives the user the illusion of a much faster, cleaner page load, and hence the impression of a faster website.

        Does that make sense?

        Paul

        [Edited to add: You should still keep doing what you're doing to produce "size-as" images for your pages. You don't want to be resizing images with the html dimensions, just reporting in html the actual size of the image]

        cyberlicious mememax 2 Replies Last reply Reply Quote 4
        • cyberlicious
          cyberlicious @ThompsonPaul last edited by

          Perfect-O!  I completely get it now.  Thanks Paul.  You da man!

          I thought it would be faster as in my mind it was more to read, but now that I understand the loading, I get it.  Guess I need to start researching how a website loads.  Have any resources I can read, to up my experience with this?

          I've been in development but on an application side not website side.

          ThompsonPaul 1 Reply Last reply Reply Quote 0
          • mememax
            mememax @ThompsonPaul last edited by

            as Paul correctly said, if your purpose is to improve the page speed just be sure that you're not resizing the images with css/html but that you're uploading the images in that dimensions.

            An image of 10241024 resized to 100100 still weights as an 1024 image so my recommendation is to resize all those images to the desired dimensions, moreover if you can use an external cdn you'll save bandwith and have those images loading outside your website. That will help reducing the loadtime of the page.

            cyberlicious 1 Reply Last reply Reply Quote 1
            • cyberlicious
              cyberlicious @mememax last edited by

              Yes, thank you.  We size them all to what we want on the site so we are good there.  Just got done doing it, and it did make a difference.  Thanks guys!

              mememax 1 Reply Last reply Reply Quote 0
              • mememax
                mememax @cyberlicious last edited by

                you're welcome, hope your site will be speeding up a lot!!!

                1 Reply Last reply Reply Quote 0
                • ThompsonPaul
                  ThompsonPaul @cyberlicious last edited by

                  Just came across a terrific resource that reminded me you'd asked about further reading, Ben.

                  Check out BrowserDiet for a huge collection of resources about tuning front-end performance of websites. (You'll see #6 talks about exactly your original question)

                  I can also recommend reading Steve Souder's two books - High Performance Websites and Even Faster Websites - both from O'Reilly. Souders is pretty much the leading specialist in this area. He's the creator of YSlow, one of the primary tools for measuring/analyzing site speed, and is now Head Performance Engineer at Google. His website is SteveSouders.com

                  That'll be more than enough to get you started. Lemme know if you're still hungry for more!

                  Paul

                  P.S. The report details from tests at webpagetest.org can also teach you a huge amount, and there's a forum there run by Patrick Meenan (who built webpagetest) which is just excellent. Patrick frequently answers questions personally.

                  cyberlicious 1 Reply Last reply Reply Quote 1
                  • cyberlicious
                    cyberlicious @ThompsonPaul last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    • Google Image Search - Is there a way to influence the related icons at the top of the image search results?
                      Dr-Pete
                      Dr-Pete
                      1
                      5
                      51

                    • In our reports we get alt tag errors for our banner images. We are unable to add alt tags to the banner images as they live inside CSS. We can add a title tag on the div title for the banner. Does that help with SEO and accessibility?
                      Shirley.Fenlason
                      Shirley.Fenlason
                      0
                      3
                      37

                    • Images are not indexing as they are in temporary ads and when the ads expired we redirect the ad image to the parent category
                      0
                      1
                      27

                    • SITEMAP - Does <changefreq>and <image:title>have any apreciable effect?</image:title></changefreq>
                      Shawn_Huber
                      Shawn_Huber
                      0
                      4
                      2.7k

                    • Null Alt Image Tags vs Missing Alt Image Tags
                      94501
                      94501
                      0
                      6
                      787

                    • How get an image on a third party site rank high on goode images?
                      VERBInteractive
                      VERBInteractive
                      0
                      2
                      149

                    • Blocking Pages Via Robots, Can Images On Those Pages Be Included In Image Search
                      Dr-Pete
                      Dr-Pete
                      0
                      6
                      682

                    • Lazy loading images effect image seo?
                      BeytzNet
                      BeytzNet
                      0
                      5
                      2.6k

                    Get started with Moz Pro!

                    Unlock the power of advanced SEO tools and data-driven insights.

                    Start my free trial
                    Products
                    • Moz Pro
                    • Moz Local
                    • Moz API
                    • Moz Data
                    • STAT
                    • Product Updates
                    Moz Solutions
                    • SMB Solutions
                    • Agency Solutions
                    • Enterprise Solutions
                    • Digital Marketers
                    Free SEO Tools
                    • Domain Authority Checker
                    • Link Explorer
                    • Keyword Explorer
                    • Competitive Research
                    • Brand Authority Checker
                    • Local Citation Checker
                    • MozBar Extension
                    • MozCast
                    Resources
                    • Blog
                    • SEO Learning Center
                    • Help Hub
                    • Beginner's Guide to SEO
                    • How-to Guides
                    • Moz Academy
                    • API Docs
                    About Moz
                    • About
                    • Team
                    • Careers
                    • Contact
                    Why Moz
                    • Case Studies
                    • Testimonials
                    Get Involved
                    • Become an Affiliate
                    • MozCon
                    • Webinars
                    • Practical Marketer Series
                    • MozPod
                    Connect with us

                    Contact the Help team

                    Join our newsletter
                    Moz logo
                    © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                    • Accessibility
                    • Terms of Use
                    • Privacy