Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

[fix-bug] image with same URL should not add twice more reliable id image tag fix #69

Closed
wants to merge 18 commits into from

Conversation

Monirzadeh
Copy link
Contributor

@Monirzadeh Monirzadeh commented Aug 21, 2023

EmbededImage add same URL how many times it exist in HTML file that make unnecessary big file and some other problem. this PR download and add image to epub just once and reference all of same url image to the same file inside epub.

  1. not download image twice
  2. better id for images in opf file Fix wrong id for images with special chatrachter in name #70
  3. fix content of image tag inside HTML to show correctly in eBooks reader.

@coveralls
Copy link

Coverage Status

coverage: 87.947% (-0.05%) from 88.0% when pulling d9a1fa4 on Monirzadeh:fix-duplicate-image into 45f45a4 on bmaupin:main.

@Monirzadeh
Copy link
Contributor Author

@bmaupin @owulveryck i get randomly same error test CI / test-mac-windows (macos-latest) in my pull request that my change is not related to that (it happen for second time). do you have any idea why this happen? i think it is not related to my change.

@Monirzadeh
Copy link
Contributor Author

@bmaupin i think generate a valid id is better to fix filename to use as id.
if it is not problem for you i will update unit test for this PR. this fix #70
it is simpler and more reliable.

@Monirzadeh Monirzadeh changed the title [fix-bug] image with same URL should not add twice [fix-bug] image with same URL should not add twice more reliable id Aug 24, 2023
@Monirzadeh Monirzadeh changed the title [fix-bug] image with same URL should not add twice more reliable id [fix-bug] image with same URL should not add twice more reliable id image tag fix Aug 26, 2023
@Monirzadeh
Copy link
Contributor Author

Monirzadeh commented Aug 26, 2023

@bmaupin i think it is ready and fix 3 bug

  1. download image twice
  2. better id for images in opf file
  3. fix content of image tag inside HTML to show correctly in eBooks reader.

if it is good to you i start update unit test.
UPDATE: do we need test image id unit test with new solution? if yes how we should that?

@Monirzadeh Monirzadeh closed this by deleting the head repository Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong id for images with special chatrachter in name
2 participants