You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to add a src attribute to the <img /> tags rendered by Picture?. Is there a reason why you chose not to add or support it (opting for srcSet instead)?
We need the src attribute to satisfy SEO requirements.
The text was updated successfully, but these errors were encountered:
The reason why we don't use src is to avoid a double download if a browser doesn't support the <picture> element because we use picturefill to polyfill that behaviour. This is explained in this section https://github.com/scottjehl/picturefill#the-gotchas
Now this was decided 3 years ago when the amount of people still using IE was a lot more than it is today so I'm not completely against changing the behaviour to use src instead of srcSet.
In terms of SEO are you sure that really affects search engines? I know that srcSet support might still be a problem to some but it seems that for those crawlers picturefill will render the images correctly. This long discussion from 2015 seems to be relevant for this scottjehl/picturefill#549
Regardless, I don't oppose to making a change in the library for this.
Hi! Thanks for this repo, quick question.
Is there any way to add a
src
attribute to the<img />
tags rendered byPicture
?. Is there a reason why you chose not to add or support it (opting forsrcSet
instead)?We need the
src
attribute to satisfy SEO requirements.The text was updated successfully, but these errors were encountered: