Alt tags / capation for tags

In Ghost CMS, we can already add alternative text (alt text) and captions to images in posts and pages. This is especially important when using images from Unsplash to ensure proper credit is given to the original creators. However, there’s a notable limitation when it comes to managing images associated with tags.

Currently, while we can assign images to tags and even use Unsplash for this purpose, there is no option to add alt text and a caption to these tag images.

Alt text is crucial for users relying on screen readers, ensuring that visually impaired users have a complete understanding of the content.

Without a dedicated field for captions, users have to rely on workarounds, such as including credits in the tag description, which is not an ideal solution.

In addition to proposing these features for future releases, I am also curious if there is currently a way for developers to add these fields manually. Is there a recommended approach or any documentation available that could guide developers through the process of customizing Ghost CMS to include alt text and caption fields for tag images?

Hello, @marius1choice advantage

I share the same concern regarding alt text and captions for tag images in Ghost CMS. While we can assign images to tags, the lack of dedicated fields for accessibility and credits is a limitation. If anyone knows of a developer-friendly workaround or documentation for adding these fields manually, I’d appreciate your insights!

Best regards,
thomas945

Workaround (since you said developer-friendly)

Create a page. Match that page’s slug to the tag slug, or some combination of tag plus predictable string.

In tag.hbs, retrieve data from the page matching the tag slug, and use that data. This is also a good workaround for wanting rich data, links, etc in your tag’s description.

Two tips: 1) Listing the page’s canonical as the tag page version causes Ghost not to include it in the sitemap and Google not to index it (because you want it to index the actual tag page instead). 2) You could also add a custom page template that you assign these “tag data” pages to, that just redirects over to the actual tag page, although users shouldn’t actually end up on them unless you link them.