Hey there,
I've noticed that if no alt prop is provided then there is no default one for the img tag.
For accessibility purposes every image should have a default empty alt tag (also called the NULL alttext), implying they are just decorative images that serves no specific purpose.
You can read more about that on MDN.
I also noticed that the sources prop in propTypes is just an array.
It should be at least a PropTypes.arrayOf(PropTypes.object).
I think this is much more robust, anyway:
What is your workflow to generate responsive images?
Is there any tools make a good developer experience?
Use case: I created the highest resolution version
and run an image processing that generates:
desktop, tablets & smartphone sizes,
then I just need to upload all theses images and adjust react-responsive-picture
The description in README is a bit misleading for FullSizePicture
"It will automatically fill the parent element maintaining the original image ratio. Please note that the parent element needs to have a defined height as you would expect for any background image as well.โ
By default you are extends it to cover the whole slot, and the slot has a fix height, how can you maintain the aspect ratio?
If you dynamically change the srcset, sizes attributes, or modify source elements, please use this reevaluate option and provide an array or array-like object of your mutated img elements. As an alternative the mutation plugin can be used.
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.
img is a void element tag and must neither have children nor use dangerouslySetInnerHTML.
in img (created by Img)
in Img (created by Picture)
in picture (created by Picture)
in Picture (created by FullSizePicture)
in div (created by PictureWrapper)
in PictureWrapper (created by FullSizePicture)
in div (created by Wrapper)
in Wrapper (created by FullSizePicture)
I am currently using it in a project written with next.js, but in order to make it work I have to maintain a fork based on #17.
Do you have any plan to merge that PR soon? It seems to be blocked by a fairly minor issue about importing vs defining a function. I am personally fine with both approach :)