Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bibi can't display svg images inside a svg wrapper #122

Open
RbnJrg opened this issue Jun 13, 2021 · 1 comment
Open

Bibi can't display svg images inside a svg wrapper #122

RbnJrg opened this issue Jun 13, 2021 · 1 comment

Comments

@RbnJrg
Copy link

RbnJrg commented Jun 13, 2021

Bibi Case.zip

The file attached is an epub file whose extension has been changed to .zip. If you open that file, you'll see that when a svg image is inserted by using the <img> tag, Bibi is able to display it without problem. But when the same image is inserted inside a svg wrapper, Bibi can't show it. To discard that the issue is due to the svg wrapper, in the epub there is a png image inside of one of this; Bibi can show a png image inside a svg wrapper without problem. So, Bibi wasn't able to display a svg image inside a wrapper because didn't reconized that kind of image in order to be inside that element. I could fix the issue by changing, in Bibi.js, the following statements:

This:
{Attribute:"src|xlink:href",Extensions:"gif|png|jpe?g"}

is replaced by:
{Attribute:"src|xlink:href",Extensions:"gif|png|jpe?g|svg"}

and this:
{Attribute:"src|xlink:href",Extensions:"gif|png|jpe?g|mp([34]|e?g)|m4[av]"}

is replaced by:
{Attribute:"src|xlink:href",Extensions:"gif|png|jpe?g|svg|mp([34]|e?g)|m4[av]"}

I hope this can be of help.
Regards

@satorumurmur
Copy link
Owner

@RbnJrg
It's exactly as you say.
It will be reflected in the next release.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants