francoischalifour / medium-zoom

🔎🖼 A JavaScript library for zooming images like Medium
https://medium-zoom.francoischalifour.com
MIT License
3.58k stars 160 forks source link

Not work on <img> element in markdown. #183

Closed yx91490 closed 2 years ago

yx91490 commented 2 years ago

Bug description

when I add image in html style in markdown, like this:

<img src="./foo.png" style="zoom: 50%;" />

image can not scale.

How to reproduce

as above

Expected behavior

image can scale.

Reproducible example

Environment

francoischalifour commented 2 years ago

Can you please provide a reproduction in this sandbox? Thanks

yx91490 commented 2 years ago

Can you please provide a reproduction in this sandbox? Thanks

Sorry I'am not best at js, but this bug can be reproduced in my blog page: https://yx91490.github.io/java/maven/maven_principle.html, corresponding markdown file : https://raw.githubusercontent.com/yx91490/yx91490.github.io/gh-pages/java/maven/maven_principle.md.

the first picture cannot zoom: https://yx91490.github.io/assets/img/maven_lifecycle.c6ee56d8.png

the second picture can zoom: https://yx91490.github.io/assets/img/mvn_clean.550b59c9.png

Thanks.

francoischalifour commented 2 years ago

You're using a Medium Zoom plugin created and maintained by vuepress-community so they likely know better what's going wrong. I would recommend opening an issue on their repo 🙂

Have a good day

yx91490 commented 2 years ago

OK, thanks!