Skip to content

Fix layout shift by introducing width and height attributes to <img> tags - #15

Open
ruppec wants to merge 2 commits into
lowtechmag:mainfrom
ruppec:main
Open

Fix layout shift by introducing width and height attributes to <img> tags#15
ruppec wants to merge 2 commits into
lowtechmag:mainfrom
ruppec:main

Conversation

@ruppec

@ruppec ruppec commented Aug 1, 2026

Copy link
Copy Markdown

This PR actually does two things, seperated into the two commits. (Sorry)

The commit messages explains in some detail why you want this but I will repost them here:

This fixes an annoyance where when images load in they shift the text
around. This is specifically annoying on slower internet speeds or when trying
to reload the page on certain devices and it taking you to a different part of
the text because of the layout changes cause by loading images.

Now the browser should reserve the space the images will later occupy so no late
update occurs.

AND

For some reason on the recent version of hugo on my laptop the previous code
wasn't working so I had to add Params in there and in the hugo.toml I had to
change the format of the author field.

I really appreciate all the work you do on the magazine and this is a slight annoyance to me that I'm hoping can be fixed and make the reader's experience more enjoyable!!

Charlie Ruppe added 2 commits August 1, 2026 18:51
For some reason on the recent version of hugo on my laptop the previous code
wasn't working so I had to add Params in there and in the hugo.toml I had to
change the format of the author field.
This fixes an annoyance where when images load in they shift the text
around. This is specifically annoying on slower internet speeds or when trying
to reload the page on certain devices and it taking you to a different part of
the text because of the layout changes cause by loading images.

Now the browser should reserve the space the images will later occupy so no late
update occurs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant