funbox / optimizt

CLI image optimization tool
MIT License
923 stars 24 forks source link

SVG optimisation breaks for some images #61

Closed rodrigogiraoserrao closed 1 year ago

rodrigogiraoserrao commented 1 year ago

Hey there, thanks for this amazing tool! I just used it to optimise hundreds of images in my blog!

However, I found some SVGs for which the tool kind of messes them up. Here is a visual example, original is top left, optimised is bottom right:

Screenshot 2023-04-12 at 23 20 33
Full SVG ``` ```
igoradamenko commented 1 year ago

Hey there!

Thank you for the feedback.

I've checked the SVG you've attached quickly and it looks like SVGO — the optimization tool for SVG we use — messes with IDs of some of your SVG's paths, while removes others of the paths.

Usually it does not happen. At least, we have never seen such a problem. We will investigate it and write you back when there be results.

rodrigogiraoserrao commented 1 year ago

Thanks for your reply, @igoradamenko. I will wait for your feedback.

If you need more SVGs that break, take a look at this commit.

igoradamenko commented 1 year ago

Hey @rodrigogiraoserrao.

@ksenius has removed the SVGO plugin that messed with your SVGs (#64). We've released @funboxteam/optimizt@5.0.0 with this change.

Please, check the migration guide: https://github.com/funbox/optimizt/blob/5.0.0/MIGRATION.md#411--500.

Feel free to reopen the issue if the problem you encounter is still here.

rodrigogiraoserrao commented 10 months ago

Sorry for the late reply but I confirm that the updated version doesn't mess up the given SVG (although it does achieve a lower compression ratio, which I assume was expected).

343dev commented 10 months ago

Sorry for the late reply but I confirm that the updated version doesn't mess up the given SVG (although it does achieve a lower compression ratio, which I assume was expected).

Hi, thanks for the feedback.

Just so you know, the project development has moved to a different repository. All the support and updates are going down over there.

Sorry for any hassle!

🔗 https://github.com/343dev/optimizt