Responsive images srcset
-
Is delivering scaled images using srcset a good idea?
Thinking of delivering one image size to Mobile and another to Desktop. How can I do this for all browsers?
Thanks Mike
-
AFAIK since the way images are used online hasn't 'significantly' changed in decades (as Zohaib says) - there is no factual industry standard. But this technique seems like it could yield faster page-loading speeds for mobile, which we all know Google does stand behind. Google often come up with an error on Page Speed insights which says, you are serving massive resolution images with a tiny viewport. They actually can and do regard that as an error, so surely if Google documents that the technique is acceptable to them and we know it solves certain issues, it is at least 'worth a try' IMO
-
I've always used CSS to scale images between devices. Though this can increase the page loading times, so for better performance there are plugins available for CMSs to improve page rendering speeds,
-
Images are some of the most important pieces of information on the web, but over the web’s 25-year history, they haven’t been very adaptable at all. Everything about them has been stubbornly fixed: their size, format and crop, all set in stone by a single
src
. -
Thanks, yes I had read this article but can't find any websites using this technique. Has it been adopted as an industry standard, or is there another option?
-
Google doesn't seem to have a problem with this:
https://developers.google.com/web/fundamentals/design-and-ux/responsive/images
"TL;DR
- Use relative sizes for images to prevent them from accidentally overflowing the container.
- Use the
picture
element when you want to specify different images depending on device characteristics (a.k.a. art direction). - Use
srcset
and thex
descriptor in theimg
element to give hints to the browser about the best image to use when choosing from different densities. - If your page only has one or two images and these are not used elsewhere on your site, consider using inline images to reduce file requests.
-
Enhance
img
s withsrcset
for high DPI devicesThe
srcset
attribute enhances the behavior of theimg
element, making it easy to provide multiple image files for different device characteristics. Similar to theimage-set
CSS function native to CSS,srcset
allows the browser to choose the best image depending on the characteristics of the device, for example using a 2x image on a 2x display, and potentially in the future, a 1x image on a 2x device when on a limited bandwidth network."This part seemed most important to me:
"On browsers that don't support
srcset
, the browser simply uses the default image file specified by thesrc
_ attribute. This is why it is important to always include a 1x image that can be displayed on any device, regardless of capabilities._ "... so basically you define your srcset as per Google's documentation, but you must be sure to include a default fallback image that could work on all browsers and devices - that's what gets used if the browser is unable to interpret your srcset (or if your srcset doesn't include anything for the specified browser)
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
How to change images of a page without loosing ranking?
Hi, I have two reasons to change some images of a page on a wordpress site: 1.Google speed service advise me to optmize the images size to better spead load times. 2.I want to change images titles (to improve seo optimization for the page keyword), so i need to replace them, since im using wordpress. Now the question is: Can i just change the images without worring about any related seo issues? Or should i follow some best practice to change images in order to not affect the ranking of the page? tx for your support!
On-Page Optimization | | Dreamrealemedia0 -
Image Titles and Descriptions Question
Hello, I have a question about optimizing the SEO on my pages through image titles and descriptions. There are a few times on my website that I use the same image on multiple pages. I am under the impression that giving it a title such as "social-media-marketing-agency-graphic.jpg" will help the SEO for the phrase "social media marketing agency" on that page. My question was, if I want to use the same image on multiple pages, am I better off uploading an entirely new image with a new title to make it more relevant to the new page? Or will this not make large enough of a difference? Or is there an easier solution? Please let me know your thoughts on how to best optimize the pages
On-Page Optimization | | brightsocial0 -
Optimizing images on website. Is it bad to use the same alt names and keywords?
I have a webpage that I have 6 separate images showing step by step instructions of how to use our product with a sentence describing instruction inside image. I took screenshots of the instructions from the products App and uploaded them to webpage because they provide a great visual. I want to make sure I optimize correctly, can I use the same keywords for all the image names?
On-Page Optimization | | artscube.biz0 -
Image naming best practices?
While I have found many good sources of information for naming images for SEO purposes, I'm having trouble finding an up-to-date, exhaustive and authoritative source for image names, alt tags, etc. For instance... Max characters for image name? Max hyphens? How descriptive should you be? "ice-cream-flavors-icon_._jpg" or "ice-cream-flavors.jpg" or simply "ice-cream.jpg" How similar should the image name, alt text and page title be? At what point are you overusing a keyword? Rules to follow? So much more, but you get the idea! Anyone have a good reference or an answer to all things related to images and SEO? Thanks!
On-Page Optimization | | OSD0 -
Built Responsive Website but only get mobile view on desktop
The responsive website we created only shows the mobile view on the desktop. There is something we have overlooked, even after skimming the code between this website and another responsive website of ours that works perfectly. We appreciate anyone who can fix this for us. Here is a link to our home page: http://trimarkfunding.com/index-trimark-funding.html We find information on allowing desktop views on mobile devices, but no information on how to get a desktop view on a desktop. It was built in Dreamweaver, and the live views and the browser views all show desktop, but when upload pages and view in desktop the pages show up as a mobile view.
On-Page Optimization | | Manifestation0 -
How important are image file names
Hi, How important do you think the image file names are for image search?
On-Page Optimization | | jjtech
I know it used to be the best practice a while ago but is it still important? Thanks in advance, JJ0 -
Should I watermark my product images
I am in the process of creating new images for my products to use on my website. Are there any advantages or disadvantages of watermarking each image? Is there an SEO impact good or bad? I am aware that filename and Alt tags are important, but am unsure if google dislikes watermarked images.
On-Page Optimization | | BipSum1 -
ALT tagging images with keyword. What is too much?
I was wondering about the best practices of ALT tags in images. Say if you have an eCommerce site and you're on a product page. This product page has 5 images of the same product (different images), should you give every image an Alt tag with the keyword for that page? Or, is that keyword stuffing, and it would actually be best practice be to provide alt tags on just one image?
On-Page Optimization | | John_Francis0