October: Fetaure Request - Alt text on images in media Library

Created on 23 Dec 2016  路  15Comments  路  Source: octobercms/october

As the title states.

Images are stored in the media library. I would like to be able to assign alt text to the images within the Media Library to be able to pull through on all the pages that image is used on, rather than having to go through all pages and components to find and update alt tag text

Archived Conceptual Enhancement

Most helpful comment

@ChadStrat Media Library item support for metadata is a feature that I plan on working on in October, ping me again if you haven't heard anything by the end of October.

All 15 comments

This is an interesting problem, because images in the media library are stored simply as files within a directory without any associated metadata. Any ideas on how to go about adding this feature to core?

It might be feasible as a plugin that stores metadata records associated to media files, extends the media library manager, and then provides twig methods for accessing / utilizing that data.

That is not a bad idea Luke. I might have to look into an implmentation like that.
I had also considered the possibility of using something like http://www.sno.phy.queensu.ca/~phil/exiftool/ to read and write the metadata directly into the images, though this is probably less practical than the suggested method, however it then does not require the database to link data to specific files.

Will have to give this some more thought.

This should be a plugin for now, if the implementation is useful we can merge it in to the core.

@daftspunk What is the best method to extend a widget? Obviously the Media Manager in this case.

Using Events in most cases: http://octobercms.com/docs/services/events

The problem in this case is that the MediaManager widget does not use events at all. Even the rename popup for example is static HTML markup and no (extendable) Form widget.

@alxy, agreed this is not ideal. However there are view events we can use to overcome this.

I as well have a project need for meta data on images via media manager. Pretty important feature.

@ChadStrat Media Library item support for metadata is a feature that I plan on working on in October, ping me again if you haven't heard anything by the end of October.

Ping :-) Has this been implemented yet? As we are also desperately waiting for a solution for this.

@thegirlinthecafe as a poor mans solution until the full version is up, you could use the rainlab translate plugin and reuse the file name with a pre- or postfix for your 'metadata'. then just translate the path names with your meta data.
twig example:

<img src="{{ 'images/cat.jpg'|media }}" alt="{{ 'images/cat.jpg'|_  }}" title="{{ ('images/cat.jpg' ~ '_title')|_ }}">

note: the path 'images/cat.jpg' could be a variable.

Thanks @munxar for the workaround. @thegirlinthecafe I'd love to start working on all the MediaManager improvements, just very busy right now. There was someone that was going to sponsor the improvements if they landed a particular client project, but it's not looking like that's going to happen at this point so it will have to get done by balancing it with other (paying) client work.

Don't forget this feature please!!!

@gmonte it's still on the list to take care of at some point, however the support demand for October is always increasing, while the available time the founders have to give remains the same. These issues will be handled in time, however there are ways you can help:

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

m49n picture m49n  路  3Comments

axomat picture axomat  路  3Comments

LukeTowers picture LukeTowers  路  3Comments

d3monfiend picture d3monfiend  路  3Comments

dunets picture dunets  路  3Comments