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

Resolve several data_roots for svg images when liip_imagine filter is used #14

Merged

Conversation

Kiwikoti
Copy link
Contributor

Issue:
The apps/sylius/vendor/sylius/sylius/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/LiipImageFiltersPass.php forces the directory of an svg to be '/media/image/' but in the plugin we are allowing other data_root. This makes the svg to not be rendered when using a liip_imagine filter because the path is wrong.
In our case '/media/' so we can have an svg in /media/gallery/images/.
We loop through the existing data_roots and if it's an svg and the file exists we resolve the path.

Features

  • Displays the svg in admin and front correctly because we resolve the right path
  • Add width and height for svg in preview file to see it
Enregistrement.de.l.ecran.2023-10-26.a.15.06.04.mov

Fix preview of svg in modal:
Capture d’écran 2023-10-26 à 15 07 15

@Kiwikoti Kiwikoti force-pushed the feature/handle-svg-liip-imagine branch from 68c9e3f to f4bfcab Compare October 26, 2023 13:16
…liip imagine to check multiple data_roots for svg files
@Kiwikoti Kiwikoti force-pushed the feature/handle-svg-liip-imagine branch from f4bfcab to ab1b9cd Compare October 26, 2023 13:23
@Kiwikoti Kiwikoti merged commit 802d9bc into monsieurbiz:master Oct 26, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants