use image/svg+xml replace base64
- Dominant language
- JavaScript
- Stars
- 47
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/FEMessage/v-img/blob/be8f25e9c62bf63986ccfebdae23aed6d8a0ae8a/src/index.js#L9
Advantages:
1. svg is smaller
2. svg is vector image format, it's better for compatibility
3. you can remove useless todo 😄
[学习了,CSS中内联SVG图片有比Base64更好的形式 « 张鑫旭-鑫空间-鑫生活](https://www.zhangxinxu.com/wordpress/2018/08/css-svg-background-image-base64-encode/)
[(1) [译]Base64 编码&性能 - 安逸 - SegmentFault 思否](https://segmentfault.com/a/1190000009552743)
Contributor guide
Research direction
Start at src/index.js line 9 and read how the image data is currently assembled, then compare it with the linked SVG and Base64 rationale. Done means the implementation uses image/svg+xml, preserves the existing image behavior, and removes the obsolete TODO mentioned in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100