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
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.
The text was updated successfully, but these errors were encountered:
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
andheight
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.The text was updated successfully, but these errors were encountered: