Use largest srcset URL in <img> elements (#305)#510
Open
stygian-ash wants to merge 1 commit intomixmark-io:masterfrom
Open
Use largest srcset URL in <img> elements (#305)#510stygian-ash wants to merge 1 commit intomixmark-io:masterfrom
srcset URL in <img> elements (#305)#510stygian-ash wants to merge 1 commit intomixmark-io:masterfrom
Conversation
If an image has a `srcset` attribute, use the largest source from there in place of the `src` attribute.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Close #305. If an image has a
srcsetattribute, use the largest source from there in place of thesrcattribute. This is useful as some websites (notably Tumblr) do not set asrcfor most images. Without these changes, Turndown would not render these images.I'm interested in this issue because it causes problems saving certain webpages with obsidianmd/obsidian-clipper, which has Turndown as a dependency. I figured it would be better to fix the issue here than submit a PR there. Also, this is my first open-source contribution, so please let me know if I'm doing anything wrong :)