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

unexpected behaviour with svg-images and image-sizes #46

Closed
ghost opened this issue Apr 24, 2018 · 4 comments
Closed

unexpected behaviour with svg-images and image-sizes #46

ghost opened this issue Apr 24, 2018 · 4 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Apr 24, 2018

Issue by @asaage
April 10th, 2018, 15:56 GMT

i noticed that when i use image-sizes in combination with svg-images
additional svg's in the srcset are created under assets/images/

<img src="assets/images/4/foo-b4a0c460.svg"
 srcset="assets/images/4/foo-b4a0c460.svg 1x, assets/images/3/foo-eeec80d9.svg 2x" 
width="250" height="250" alt="foo" itemprop="image">

The svg's i am using do not contain width/height attributes - only the viewbox attribute and i did not set any important-part for them in the filemanager.
I would expect contao to just set the width and height on the <img> and not create additional svg's with contained width/height attributes.

Of course i could just use a different image-size without pixel-density descriptors but i have mixed filetypes in a gallery so that's not really an option.

@ghost
Copy link
Author

ghost commented Apr 24, 2018

Comment by @leofeyer
April 12th, 2018, 08:48 GMT

@ausi /cc

@ghost
Copy link
Author

ghost commented Apr 24, 2018

Comment by @ausi
April 15th, 2018, 13:45 GMT

I’m not sure what’s the correct way to solve this. Should we just hardcode to not generate different densities for SVG images in the PictureGenerator?

@ghost
Copy link
Author

ghost commented Apr 24, 2018

Comment by @leofeyer
April 15th, 2018, 18:31 GMT

I think we should. It does not make much sense, does it?

@ghost
Copy link
Author

ghost commented Apr 24, 2018

Comment by @ausi
April 24th, 2018, 11:32 GMT

We should move this issue to contao/image then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant