Handle Reddit galleries with links, and show thumbnails for small images in Reddit galleries #1103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR has three small improvements for galleries.
First, Reddit galleries containing links can now be opened, which was not working because Reddit put the first outbound link in the gallery as the
url
. I fixed this by usingurl_overridden_by_dest
instead if it's present, which does not seem to effect anything else. (#1061)Second, links in Reddit galleries can now be seen and used, in the form of link buttons (regardless of if they are enabled for comments). I experimented with also having the link present alongside the image's title, dimensions, size, and caption, but the buttons seem sufficient to me. I considered an option to disable the link buttons here, but Reddit galleries with links seem to be relatively rare, so I doubt it's necessary.
Third, thumbnails for small images in Reddit galleries are now shown by downloading the original image. They were not displaying before, because Reddit does not seem to generate gallery thumbnails for images smaller than 108x108.
Closes #1061.