Skip to content

Conversation

@gedankenstuecke
Copy link
Member

No description provided.

@nlharris
Copy link
Member

nlharris commented Dec 4, 2025

but if the web pages that use these already set the image sizes explicitly, and they are not 1024, will they still look good?

@gedankenstuecke gedankenstuecke mentioned this pull request Dec 4, 2025
3 tasks
@gedankenstuecke
Copy link
Member Author

The only problem will be if any of the explicit sizes are larger than 1024, do you know if that's the case?

@nlharris
Copy link
Member

nlharris commented Dec 4, 2025

i don't know offhand, but it's possible...

@gedankenstuecke
Copy link
Member Author

Based on quickly grepping through our files, it seems that the only images that have set image sizes do so using relative declarations, i.e. style="width:60%".

But in any case, I checked and our container-width for content is at most 750px ({.container{width:750px}}, so even if images are full-width 1024px is safe.

@nlharris
Copy link
Member

nlharris commented Dec 4, 2025

Sounds good. I have a grant proposal TODAY and need to stop looking at this now but you can merge and I'll check things later.

@peterjc
Copy link
Member

peterjc commented Dec 4, 2025

Sounds good, not at a computer right now to check though.

@gedankenstuecke
Copy link
Member Author

No worries, we don't need to rush

@peterjc
Copy link
Member

peterjc commented Dec 5, 2025

Is GitHub confusing things, or have smaller images like static/img/2025/2025-cavern-club-outside.jpg or static/img/BastianGreshakeTzovaras.jpg not changed size, but got updated in some more subtle way?

Can you see an easy way to do PNG to JPEG where the associated MD files would have to change too? Maybe a sed search-and-replace command on the blog posts only?

@gedankenstuecke
Copy link
Member Author

Oh, good catch for those images that weren't actually resized. What happens is: those images were >300 kb, so the one-liner tried to resize them, but as they were already <1024px on the widest, they were left unchanged in terms of size. But, given how JPGs work, the compression algorithm still "changed" the file when saving it again.

In theory this leads to compression artifacts if one does this again and again, but I think it's fine here for the one-off edit we made.

I'll have a look for the PNG to JPEG edits!

@gedankenstuecke
Copy link
Member Author

Okay, short answer is no: The problem is that we got png files in the old wp-content folder too, and are also embedding external png files from other web pages. I'm sure one can do a clever grep & sed combination to only find the ones in the current static directory and then convert those and change the corresponding md files, but it requires more time to come up with that I fear.

@peterjc
Copy link
Member

peterjc commented Dec 5, 2025

That's what I feared for PNG to JPG - but given the number of large PNGs a less automated solution is fine.

@gedankenstuecke
Copy link
Member Author

Shall we do that work in a separate PR though?

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.

4 participants