Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It’s just crazy to me that RSS doesn’t have a property specifically for an image URL. Like, what’s the problem with that? Does ATOM have this support?


The question is what do you mean by "image URL". Is this a poster, hero image, site logo, the content of the post itself? This is what is lacking.

In RSS the main media attachment is the <enclosure> element. However like a lot of things in RSS it is poorly specified. For example it isn't even clear if you can have multiple. If you have multiple are they different representations of the same resource or different resources?

https://validator.w3.org/feed/docs/rss2.html#ltenclosuregtSu...

The solution to this is the Media RSS spec. (Which is also commonly used in Atom. XML namespaces are actually kinda nice.) This is a lot better if only because they contain the <group> element which makes it clear what different things mean. (Different representations or different resources.) Unfortunately support is still varied and it isn't always clear if this is just a copy of every image in the post (WordPress...), only semantically relevant images, or images that are the point of the entry but don't appear in the post.

https://www.rssboard.org/media-rss

So unfortunately the best path forward is probably yet another standard that makes these clear from the outset, and hoping that people actually follow the rules. Not an easy path forward.

Again, I'm not an expert on media in feeds, but based on the feeds I have seen trying to write a feed reader I would do the following if I was creating a feed with media in it.

1. Use Media RSS. Don't use <enclosure> at all unless you are a podcast.

2. Only reference interesting images directly. You are welcome to include whatever you want in the HTML for stylistic reasons but don't put reference it outside of the HTML unless it is actually an interesting image.

3. Put every media element in a group. Basically because WordPress puts everything into a media element and it is unclear if these are the same images, duplicates or even interesting at all (I don't need the author's avatar listed in the media elements WordPress...). Even if you only have one representation put it in a group just because it is unambiguous what you mean.

If anyone has more experience here I would love to hear what you think.


Presumably the parent commenter means some way to specific some additional per-item pizazz in the vein of Twitter cards.

Nothing stopping a reader from fetching the linked resource and pulling useful stuff out of the existing Open Graph annotations, of course...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: