Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix image URLs in the RSS feed. #1358

Merged
merged 1 commit into from Mar 22, 2024
Merged

Conversation

FoamyGuy
Copy link
Contributor

I noticed while testing the other RSS feed changes that the images weren't loading successfully (at least in the client app I tested which was FeedR on Android). They appeared as "broken image" icons.

Inspecting the code of the feed item within the app revealed that the image URLs were relative rather than absolute. When the page gets rendered in an HTML page that works fine because the client browser will know it's relative to the host of the page being viewed.

I don't know if RSS spec includes something about relative URLs within feed items pointing back to the host of the feed source, but in this app that doesn't appear to occur automatically.

Adding a hardcoded portion to the URL with the host allows those images to load successfully.

Originally I had hoped there was some way to dynamically include the hostname rather than hardcoding it. That way when viewed locally the images would be loaded from the local instance rather than the public one. I was unable to figure out a way to make it dynamic though and settled for hardcoding the public URL.

Copy link
Contributor

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@makermelissa makermelissa merged commit cbe0d35 into adafruit:main Mar 22, 2024
2 checks passed
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.

None yet

2 participants