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
Observe that the output JSON contains two 400-width images in the array.
This causes an issue on my site where an image is listed twice in the markup:
Also reproducible if:
You replace null with 400: [400, 400].
You pass in duplicate formats, like [null, 'png'] when the original format is png.
Expected behavior: The final widths/formats passed to the plugin should be unique. If a width/format happens to coincide with the source image width/format (null), only one copy should be returned.
Would be happy to contribute a PR (assuming this is in fact a bug and not the intended behavior)
The text was updated successfully, but these errors were encountered:
AleksandrHovhannisyan
changed the title
If null happens to coincide with one of the image widths passed in, two copies are generated
If null happens to coincide with one of the image widths or formats passed in, duplicate copies are generated
Aug 31, 2021
Steps to reproduce:
[null, 400]
for thewidths
option.This causes an issue on my site where an image is listed twice in the markup:
Also reproducible if:
null
with400
:[400, 400]
.[null, 'png']
when the original format ispng
.Expected behavior: The final widths/formats passed to the plugin should be unique. If a width/format happens to coincide with the source image width/format (
null
), only one copy should be returned.Would be happy to contribute a PR (assuming this is in fact a bug and not the intended behavior)
The text was updated successfully, but these errors were encountered: