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

SVG image transformer #42

Merged
merged 1 commit into from
Jul 11, 2023
Merged

SVG image transformer #42

merged 1 commit into from
Jul 11, 2023

Conversation

RicLeP
Copy link
Owner

@RicLeP RicLeP commented Jul 11, 2023

Added an SVG image field and transformer for Storyblok assets.

The old transformer could break if you were using mixed raster and SVG images with transformations in your templates.

By default, when encountering an SVG image the field class will now be Riclep\Storyblok\Fields\SvgImage and use the Riclep\Storyblok\Support\ImageTransformers\StoryblokSvg transformer.

The new field and transformer will return the unaltered SVG path from Storyblok without attempting to transform it. There are plans to possibly expend this in the future with SVG specific functionality.

You can restore the original behaviour by creating a field class in app\Storyblok\Fields. The class name should match with the FieldName or BlockNameFieldName. E.g. App\Storyblok\Fields\Logo or App\Storyblok\Fields\HeroBlockImage

@RicLeP RicLeP merged commit d702e94 into master Jul 11, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant