Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Yesterday 21:16:47

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,740
GitHub

SVG handling changes in 4.9.1

I’m dev’ing a site that started life on 4.8.8 and was upgraded to 4.9.0. Upgrading to 4.9.1 appears to have changed the way SVG files are handled in <txp:image> and the previously-correct layout I had has been thrown off. Before I post some background, are there any specific changes to SVG handling that have been included in 4.9.1 that are different to 4.9.0?

Thank you.

Offline

#2 Yesterday 23:22:40

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,654
Website

Re: SVG handling changes in 4.9.1

There were some changes to the handling of thumbnail generation, but I don’t think that should have any effect on SVG images as those are excluded from the thumbnail generation. And I haven’t noticed anything different here.

Out of curiosity, what is the issue you are seeing?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#3 Today 07:25:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,469
Website GitHub

Re: SVG handling changes in 4.9.1

Hmm, I thought SVG were always excluded so the image sizes in your template should remain.

BUT in 4.9.1, now that width and height are excluded by default unless you ask for them, there’s a chance your SVGs are displaying at their native/max resolution as defined in the image’s SVG code, rather than being constrained by the width/height in the database.

A solution for SVG is to always supply at least one dimension, which arguably should be mandatory anyway since they scale to any size and – depending on CSS – will stretch to fill all available space unless told otherwise.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB