Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Yesterday 11:44:28

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 334
Website GitHub GitLab Mastodon Twitter

Image dimensions

I have not noticed when <txp:image id="123" /> stopped automatically retrieving the image’s width and height from its database. No problem: when entered manually, even with no dimensions, the width and height are converted to HTML correctly. Maybe the policy has changed, and I missed it? The tag reference still states

The tag outputs the alt, width, and height attributes by default.

Offline

#2 Yesterday 19:00:52

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

Re: Image dimensions

The behaviour has changed in 4.9.1 and the docs have not caught up yet. If you want to output the dimensions as stored in the database, provide valueless height and width attributes.


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