The img srcset attribute and...
I'm just starting to validate my pages generated in RSD and I'm getting this error. . .
Element img is missing required attribute src.
So apparently the img 'srcset' attribute doesn't do it, and does not validate. Is that something I need to be concerned about, and how do I get my RSD generated pages to validate? I've noticed RLM uses 'src' for images, but RSD uses 'srcset'.
Element img is missing required attribute src.
So apparently the img 'srcset' attribute doesn't do it, and does not validate. Is that something I need to be concerned about, and how do I get my RSD generated pages to validate? I've noticed RLM uses 'src' for images, but RSD uses 'srcset'.
The <img> tag always requires the src attribute.
You can optionally add the srcset attribute to specify a set of different images for different viewport widths. The src attribute then provides the fallback for browsers that do not support the srcset attribute.
http://www.w3schools.com/css/css_rwd_images.asp
You can optionally add the srcset attribute to specify a set of different images for different viewport widths. The src attribute then provides the fallback for browsers that do not support the srcset attribute.
http://www.w3schools.com/css/css_rwd_images.asp
Per
www.mingas.com
www.mingas.com
That's a nice catch. Not having it won't cause any issues since the srcset will override src for most / supporting browsers and we are using a 'fix' for older browsers. Said fix can cause a double download on certain browsers if both the fix and src are used. On a perfect world, where all the browsers are compliant to the specification, the fix would not be needed.
Nevertheless, we will spend some time looking into this and see if we can improve the markup / fix. For now we feel is better to avoid image flashes and double downloads, which would use unnecessary bandwidth.
Thanks for paying attention guys!
Nevertheless, we will spend some time looking into this and see if we can improve the markup / fix. For now we feel is better to avoid image flashes and double downloads, which would use unnecessary bandwidth.
Thanks for paying attention guys!
The future of web layout has arrived and it's called CSS Grid. CoffeeCup helps you to get ready with a free guide, the Grid Builder app plus cool demos & themes.
Thanks Per and Bob. Okay, so for now, I took one of my pages and opened it in the CC HTML editor and replaced all of the srcset with src on all of the images on that page. And now the page validates. Is that the best plan of attack for now, since I have no reason to have srcset there (I'm not doing anything that requires it being there), but have every reason to have src there? If that is not the best thing to do, please let me know, as I want to get my site all done and live here shortly, and hopefully all of the pages validating.
Thanks guys!
Thanks guys!
You can if you want and don't need the srcset, but honestly, from our experience it's not going to impact anything if you don't...
The future of web layout has arrived and it's called CSS Grid. CoffeeCup helps you to get ready with a free guide, the Grid Builder app plus cool demos & themes.
Thanks Bob. Color somewhat paranoid. My website has been on the first page of Google in one of the top 3 spots for many years, and I just don't want to do anything that will disturb that position, when I launch the RSD version of my website here shortly. Its been hard to find info on whether a site needs to validate 100% or not to stay out of trouble. I've just been trying to err on the safe side of things.
Sounds like I might be too paranoid perhaps?


Michael Brose wrote:
Thanks Bob. Color somewhat paranoid. My website has been on the first page of Google in one of the top 3 spots for many years, and I just don't want to do anything that will disturb that position, when I launch the RSD version of my website here shortly. Its been hard to find info on whether a site needs to validate 100% or not to stay out of trouble. I've just been trying to err on the safe side of things.
Sounds like I might be too paranoid perhaps? 
Thanks Bob. Color somewhat paranoid. My website has been on the first page of Google in one of the top 3 spots for many years, and I just don't want to do anything that will disturb that position, when I launch the RSD version of my website here shortly. Its been hard to find info on whether a site needs to validate 100% or not to stay out of trouble. I've just been trying to err on the safe side of things.


You are being too paranoid, but that is ok.

While having pages that validate are nice and something to strive for, there are mixed opinions on how it ultimately impacts your rankings. You can find all sorts of discussions on this here at https://www.google.com/search?q=does+va … p;ie=UTF-8
This particular article does hit the point pretty well:
http://www.hobo-web.co.uk/official-goog … -html-css/
"If Google can read it – it will rank it. Google was built to understand websites with low quality code, and it’s got a lot better over the years. I have never observed a site that was inaccessible run into major ranking problems that weren’t probably caused by other more important factors."
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
Thanks much Scott. That helps give me a more balanced view of the SEO/Validation situation. So then the 'srcset' attribute (without src) should work well on most browsers and mobile devices I'm guessing?
Hi Guys;
I just wanted to add my experience to this subject. Without the SRC tag, the site will not load the images in any browser except FireFox. This includes EDGE, OPERA, IE11, SAFARI for windows, CHROME, and android browsers....phone or tablets.
It seems to me, based on my experience, that having RSD put in the SRC tag instead of the SRCSET tag would give much better results. At this time, I have to go into every page after saving in RSD and add the SRC tag (or replace SRCSET tag) manually.
From what I have seen, the SRCSET tag is not supported much in the browser community.
I'm sure I'm missing something, but that's the real world for me. If I'm doing something wrong, please point it out.
Thanks much.
Ronn
I just wanted to add my experience to this subject. Without the SRC tag, the site will not load the images in any browser except FireFox. This includes EDGE, OPERA, IE11, SAFARI for windows, CHROME, and android browsers....phone or tablets.
It seems to me, based on my experience, that having RSD put in the SRC tag instead of the SRCSET tag would give much better results. At this time, I have to go into every page after saving in RSD and add the SRC tag (or replace SRCSET tag) manually.
From what I have seen, the SRCSET tag is not supported much in the browser community.
I'm sure I'm missing something, but that's the real world for me. If I'm doing something wrong, please point it out.
Thanks much.
Ronn
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.