-
Notifications
You must be signed in to change notification settings - Fork 43
Description
There are cases where people depend on the size of the image in their layout, and a tiny placeholder is obviously of smaller size, which can cause jank when images are swapped in for their full quality equivalents. With content outside of webpack, I have a way to get the size of the original image along with the placeholder and the URL to the full quality image for content outside of webpack, and I use it to set the size of the placeholder. Certain things are simply impossible without such information. My suggestion is to add an option to add width and height properties (Numbers with the value in pixels) to the Object returned from this loader. It's a minimalistic approach which makes it easy to get things like aspect ratio of the image if someone needs it, and provides information about the raw asset itself.