Improvements to image handling in posts
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Doing a bit of brainstorming about how we can handle images in posts better.
- [ ] Add `width` and `height` attributes to rendered images to prevent content jumping as images load. ([Use this library](https://github.com/willwashburn/fasterimage))
- [ ] When a large image is included in a post (greater than a certain number of MB) treat it as an image upload - download a local copy, make a thumbnail, and wrap it in a lightbox so that you can click on it to view the full size.
- Probably do this as part of an Attachments extension
- Inspiration: https://github.com/discourse/discourse/blob/master/app/jobs/regular/pull_hotlinked_images.rb https://github.com/discourse/discourse/blob/master/lib/cooked_post_processor.rb
Contributor guide
Research direction
Start by reviewing the post-rendering path and the proposed Attachments extension, then compare the linked Discourse image-processing examples. The work is done when rendered images reserve their dimensions and oversized remote images are downloaded, thumbnailed, and presented in a lightbox, with the scope and threshold decided.
Written by the indexing model from the issue text.
Assessment
- Domain
- content
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100