TYPO3-Headless / headless

TYPO3 Headless JSON API providing content for PWA application (e.g. javaScript apps like nuxt-typo3)
https://t3headless.io
GNU General Public License v2.0
156 stars 58 forks source link

Wrong dimensions for resized SVG images #782

Open davidlemaitre opened 6 days ago

davidlemaitre commented 6 days ago

Describe the bug I want to use a SVG image in a Text & Images content element with specified dimensions (imagewidth & imageheight fields) but the dimensions height and width are still the original dimensions in the JSON output. No issue with other image formats.

To Reproduce

  1. Create a "Text & Images" content element
  2. Add a SVG image
  3. Modify image dimensions
  4. See the dimensions height and width in the JSON output

Expected behavior The dimensions height and width should be corresponding to the new dimensions of the SVG image.

TYPO3 version and TYPO3 Headless version TYPO3 11.5.38 EXT:headless 3.4.2

Additional context PHP 8.3

twoldanski commented 1 day ago

Hi @davidlemaitre in previous versions of TYP3 we had as far as I remember some issues with processing of SVG files, so we added check for not processing SVG files and it stuck for next versions, I created small PoC with additional flag for processing. In latest 4.x releases, I added same flag to process SVG if needed.