Widgets - Image: use code like the one that adds support for Text widget #6630
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related #6599
Changes proposed in this Pull Request:
<img />
tag just like it would do in content or Text widget and use theresize
mode which is more reliable.Note that this doesn't solve the issue of the poor resampling experienced in Firefox. This seems to be a common occurrence since it also happens with images placed in the Text widget.
The difference between Blink and Gecko is that the
zoom
parameter isn't sent from Gecko. Thesrcset
attribute isn't built, so the image served is a non-hidpi one.To the left, you can see how Image and Text widget render in Chrome, and to the right how Firefox does
Testing instructions:
<img src="URL TO SOME IMAGE" width="200" height="150" />
in it.Proposed changelog entry for your changes:
Widgets - Image: improve rendering of image.