Recent submissions

Comment · 4 years ago
Glad to hear it!

Andrew Welch / el presidente

Comment · 5 years ago
You made my day, thanks for that! /andrew
Comment · 5 years ago
"had" ;) /berserkir
Comment · 5 years ago
I made that game in college with the help of some very talented artists, and my friends who helped with the sound effect. It was written on a Mac IIsi IIRC! We def had fun making it (and playing it while making it) /andrew
Comment · 5 years ago
Thanks Tom. Always loved having you work there, definitely tried to work to live rather than live to work! /andrew
Comment · 7 years ago
Agreed; if the images are purely decorative (some are, some are not) then it should have an empty `alt=""` to have screen readers skip them.

But I would still want to use an actual picture element with srcset & source attributes/tags for the reasons mentioned in the article.

Comment · 7 years ago
Author here. I'm familiar with optimizing images via webpack and the like; there's an article I wrote on the same site as this one detailing just that (amongst other things):

https://nystudio107.com/blog/an-annotated-webpack-4-config-f...

The issue is that for many larger sites that are content-managed, the images aren't known at build time. So you need some kind of mechanism in place to deal with optimizing user-uploaded images.

Obviously you don't want truly decorative images indexed; but that's not what the article is discussing (except in the "SO WHEN IS IT GOOD?" section). It's discussing the abuse of CSS background-image for content images, something I've seen as being quite prevalent.

As the article mentioned, this is bad for accessibility, SEO, performances, and other lesser issues.

Comment · 7 years ago
Author here. Yep, this is exactly my point! Don't use CSS background-image for "content images". There are significant downsides for doing so.
Comment · 7 years ago
Author here. What advice is "bad" in your estimation?

As for not following my own advice, that's not quite right. I'm using picture and img tags rather than div's with CSS background-image, which is the main thrust of the article.

I'm also using srcset for performance, and webp as a progressive enhancement for browsers that support it.

The only thing I'm not doing is using the new loading="lazy" because the website was creating long before the article.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton