dteviot / WebToEpub

A simple Chrome (and Firefox) Extension that converts Web Novels (and other web pages) into an EPUB.
Other
729 stars 139 forks source link

Why does Include URL of Images exist? #1544

Open gamebeaker opened 1 month ago

gamebeaker commented 1 month ago

As I understand it: If a image is .jpg etc. the source URL is included as a comment <!-- https://example.com/img.jpg --> (doesn't matter if Include URL of Images is checked) If "Use for images" is used the source URL is only included if "Include URL of Images" is checked as <desc>https://example.com/img.jpg</desc> Both are meta data that the user can't see.

If the user can't see it why is that an option?

Todo: If this should be kept in WebToEpub change the comment after the img element to the alt attribute (is the same as <desc> for svg) and only to be included if the option is checked.

edit: I found the commit and it references #22

dteviot commented 1 month ago

@gamebeaker WebToEpub records where it gets all the chapters and images from. I think the idea was that some sites provide multiple images. So (at least in theory) those who wanted to could use this to find the alternate resolution images, and replace. That said, the source URLs are now recorded in the content.opf file as <source> elements. So, we can probably remove adding the URLs to the chapters.