Poul Udbye Pock-SteenPoul Udbye Pock-Steen wrote the following post Thu, 02 Jul 2026 17:52:00 +0200

[zmg] tag: the two parsing modes appear to be mutually exclusive

Thank you for your advice with the zrl tag. The text I pasted yesterday got truncated and so the issue wasn't exposed correctly. I give it another try:
---
When inserting an image in an Article, Hubzilla automatically generates the following BBcode:
[zrl=https://example.com/photos/channel/image/UUID][zmg=https://example.com/photo/UUID-2.jpg]My alt text[/zmg][/zrl]

This correctly produces alt text in the HTML output:
alt="My alt text"
And a correct attachment.name field:
"name": "My alt text"
But the image is not displayed at full width in Hubzilla's own interface.

To get a fixed display width, the syntax must be changed to:
[zrl=https://example.com/photos/channel/image/UUID][zmg=850x480]https://example.com/photo/UUID-2.jpg[/zmg][/zrl]
This correctly produces full width in Hubzilla's own interface:
style="width: 850px; max-width: 100%;"

But then the alt text becomes:
alt="Image/photo"
And the attachment.name field is missing entirely.

Attempts to add alt text to the size-based syntax produce an incorrect attachment.name field. For example:
[zrl=https://example.com/photos/channel/image/UUID][zmg=850x480 alt="My alt text"]https://example.com/photo/UUID-2.jpg[/zmg][/zrl]
Produces:
"name": "480 alt=\"My alt text\""
Instead of simply:
"name": "My alt text"

The two parsing modes — URL as parameter vs. size as parameter — appear to be mutually exclusive. Is there a syntax that supports both a correctly sized image and correct alt text simultaneously?

Thank you!