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
-
Image scale Error On page seo
I Have an Image Scale Error in Gtmetrix how to solve it which is the best way to solve it I tried many ways but it's not working.
On-Page Optimization | | AlexSmithh0 -
How to deal with hundreds of externally-generated images with no alt text?
Hi all This is a good one. I work for a webdev company who has clients in the transport industry. Part of our work on their sites involves pulling in transport-related offers from a feed. This includes both text and images, which our site template turns into viewable pages. The problem is that Moz has flagged that these images don't come with alt text, and there are _hundreds and hundreds of them. _I can't add alt text to them all, there just isn't the time or resources. Besides, the list is updated frequently, and new images are pulled in. So... what do? Would it be prudent to noindex them all by default setting? I'm stuck! Many thanks,
On-Page Optimization | | tomcowles
Tom0 -
Replacing text with images
Hello, My client is a "cheap calls" site which is offering calls to around 300 countries in the world. The pages for each country are almost the same, as they are mostly terms and conditions of making a call and explanation of the process how to do it. The copy is quite long (more than 850 words) and the country name is repeated about 26 times in the text. The country name and the phone number is the main difference between the pages, which makes them almost the same. I have recommended to add testimonials to each country and towns within the country, but I am afraid it will not dilute the similarity between the pages enough for Google to stop seeing them as duplicated. Also the client do not exactly rush to publish the testimonials for every country. The rankings are not too bad and all seems fine, but in the long term I know we need to do something. I am not sure if the client would agree to shorten up the copy, as they believe in old style seo with keyword stuffing and bolded keywords but I would like to overcome that problem with exchanging the most of the copy with an image. I would write a new copy for each page making it unique (around 2-3 paragraphs) and the rest would be an image stating exactly the same thing as the copy now to provide the same amount of info to the user. Theoretically it should help to resolve this problem, but would like to check if anyone has done something like that and if it worked/may work. Are they any other implications?
On-Page Optimization | | ThinkingJuice0 -
Author snippet image in results, question!
Hi, Quick question really, I can see how a Google+ profile picture showing up in the results can increase CTR and even trust but would this be a no no for a normal website? I mean if you had a website which offered personal training, so a brand rather than an individual would you not use this snippet? I've seen some website, even ecommerce sites using this tag to just increase their CTR.
On-Page Optimization | | Bondara0 -
Why will google not index my Images
Hi I've added to index images in our sitemap although they are showing as being submitted Google hasn't indexed a single one. This has been the case for about 3 months. Is there any reason why Google would not index them? Thanks
On-Page Optimization | | tidybooks0 -
Summarize your question.Images being seen as duplicate content/pages
My images suddenly are appearing in my crawl reports as duplicate content, without meta tags, this happened over night and cant figure out why.
On-Page Optimization | | RBYoung0 -
What's the best way to name an image for SEO?
Hi Guys,
On-Page Optimization | | krseo
I'm thinking about images and SEO. What's the best way for naming and using images in HTML Code? For example: Image-Name: keyword-keyword2-keyword3.jpg or keywordkeyword2keyword3.jpg ?
How many Keywords should I use max for a picture? And also do you use the alt tag as description of the image and the title tag or only the alt tag? If you use the title, what do you use it for? Maybe someone can copy a HTML-Code example for me 😉 Thank you 🙂
Alex0 -
Image ALT Attribute
Hi, Got a message from the On-Page Optimizer to update the ALT Attribute in an image. Does that mean just rename the image and re-upload it on to the site? Thanks!
On-Page Optimization | | OTSEO0