timse / srcset-loader

Flexible srcset-loader for webpack
46 stars 14 forks source link

Can ?placeholder give us the raw image instead of an svg one ? #6

Closed ephys closed 7 years ago

ephys commented 7 years ago

Instead of exporting a .svg containing a base64-encoded image, can you just export the base64-encoded image itself ?

The reasoning behind my request is that we might want to do something else than blur the tiny image, or do an animation on the svg itself. Also, adding the blur after importing the image might reduce the bundle size as the svg part wouldn't be repeated in every image module.

Thank you :)

ephys commented 7 years ago

As we needed this feature for one of our projects, we forked srcset-loader and added add the option in a backward-compatible way, along with a few minor changes.

@timse Tell me if you're interested in merging the changes, I'll create a pull request so you can review them. I wrote a changelog here for a quick recap.

timse commented 7 years ago

heya, sure, just open a PR and we can check from there. Sorry i am only responding now, your initial issue didnt cause any notifications :(

ephys commented 7 years ago

I think we can close this then. :)