[openstreetmap/openstreetmap-website] Specify avatar dimensions in html tags (#3340)
Andy Allan
notifications at github.com
Wed Oct 13 13:10:16 UTC 2021
This prevents reflow when the images are loaded by the browser.
ActiveStorage variants are resized lazily when the image is requested, so we only know the dimensions if the image was already loaded. This means that there will be one reflow just after a new avatar is first viewed.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3340
-- Commit Summary --
* <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3340/commits/9f61d6c1cf2d796ba8089f299679c2496ecfbbca">Specify avatar dimensions in html tags</a>
-- File Changes --
M app/helpers/user_helper.rb (34)
M test/helpers/user_helper_test.rb (45)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3340.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3340.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3340
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20211013/0ee354b2/attachment.htm>
More information about the rails-dev
mailing list