-
Notifications
You must be signed in to change notification settings - Fork 6
Svg changes #273
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
base: main
Are you sure you want to change the base?
Svg changes #273
Conversation
Signed-off-by: IsaacPimentel73 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At cover images is necessary to be jpeg, but we need to apply image compression at all jpeg images, or maybe we can use PNG with compression.
SVG is only to vectorial images like a logo with curves.
SVG images also should be compressed to be used at web context.
Maybe @Zagaz could have a good opinion about usage PNG or jpeg as format of cover images. https://duckduckgo.com/?q=use+jpg+or+png+to+web+images
A suggestion of to-do list to this issue:
- compress all jpg images. https://duckduckgo.com/?q=compress+png+for+web+linux&t=ffab&ia=web
- Compress svg images
Other suggestion to compress image is searching for online websites that do this. By example, search by "online png compression" or "online svg compression".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using this image?
I think that is pending to remove this image, right?!
source/assets/images/posts/advanced-security/cover1.svg
SVG is vetorial images. Isn't necessary and isn't good to convert pictures to SVG. Photos need to be maintained as JPG.
Every when we change an url, is important to check if the URL was indexed at internet to don't break the referred links. Other important point is to fix the DCO issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[This is largely context for the original author so they have a better understanding of what's wrong here. It seems the maintainers know what's up! Though I would recommend closing this PR and maybe creating an issue if you want to track compressing assets?]
It really wouldn't be a good idea to merge this PR.
These are mostly "fake SVGs". If you read the SVG content it's just the JPEG but base64 encoded and inlined into the SVG. They aren't real SVGs, but just very inefficiently formed JPEGs.
It is generally a good idea to use SVGs instead of JPEGs for works where the style allows (i.e., simple shapes, cell shading, etc.), and where there isn't a technical limitation to prevent its use.
For example, for SVGO.dev, we gravitate towards SVGs, but for our Open Graph banner, we use JPEG too. (It doesn't look like this is the same reason JPEG isn't acceptable here, but it's just one example of why SVGs aren't always feasible.)
Even if we presumed SVGs were technically allowed, let's look at at three of these images:
File | Original Size | SVG Size |
---|---|---|
source/assets/images/posts/advanced-security/cover.jpg |
170 KB | 14.5 MB |
source/assets/images/posts/hybrid-signatures/cover.jpg |
164 KB | 867 KB |
source/assets/images/posts/qr-code/cover.jpg |
156 KB | 91.3 KB |
On average, it makes the images larger, and then the browser still needs to still build the image from the markup anyway, so it'll take longer to render even once downloaded.
The only arguable improvement is the QR Code banner, but even that includes inline/base64 JPEG.
The idea doesn't really make sense for advanced-security
. It could make sense for hybrid-signatures
but just wasn't performed correctly.
Hi @SethFalco, would you like to submit a new PR with your fix to this? |
Do you know LibreSign? Here is the main repository: https://github.com/libresign/libresign We also will like a more star at main LibreSign repository :-) |
Converting jpg images into svg.