yosbelms / react-progressive-loader

Utility to load images and React components progressively, and get code splitting for free
217 stars 12 forks source link

Additional img properties get set to surrounding div not to img #4

Closed SvenChristian closed 5 years ago

SvenChristian commented 5 years ago

"This component also accepts all the img properties (className, style, ...)"

If I want to set srcSet - then the surrounding div gets this option - not the img tag for which I want to set it

yosbelms commented 5 years ago

Right, it doesn't work like in docs, there is some img-specific props that needs to be passed directly to the img component. One approach could be to define a property for this, eg: imgProps the other is to pass down certain properties. I'll take this

yosbelms commented 5 years ago

just published v0.3.0 now passing srcSet, sizes, and alt props down to the img element