Comment on [zmg] tag: image size and alt text cannot be combined correctly

<- View Parent
pepecyb@hub.hubzilla.hu@hub.hubzilla.hu ⁨2⁩ ⁨weeks⁩ ago
@Harald Eilertsen @𝓒𝓱𝓻𝓲𝓼

I’ve just been looking into this topic in more detail, particularly in relation to Mastodon.

When you attach an image with a caption on Mastodon, both the `alt` and `title` attributes are set to that text. This means that when the image is imported into Hubzilla, the text description is also displayed as a title pop-up.

If you add a description to an image on Hubzilla by placing it between the [zmg][/zmg] tags (the usual method), i.e.

[zmg=<IMAGE_URL>]<IMAGE_DESCRIPTION[/zmg]

Hubzilla behaves in exactly the same way as Mastodon, inserting the description using both the alt attribute AND the title attribute.

When this reaches Mastodon, the image description is also flagged and displayed accordingly.

If, on Hubzilla, you insert the image description within the [zmg=] tag, the image description is added as the alt attribute, but no pop-up appears because the title attribute is not set. On the receiving end, e.g. on Mastodon, the alt text is flagged and displayed.

So, if you want an image description on Hubzilla not only to be present but also to be visible as a pop-up, the “usual method” is the better choice. If it’s really just about the image description and you don’t want a huge pop-up to appear for “epic image descriptions”, then use the option with the alt attribute within the [zmg=] tag.
Attachment: # ↗

original
Sort:hotnewtop