I need to store author of each image (and display it). What is the best approach for that?
Do I really need to create custom media source type?
-
☆ A M B ☆
- 24,524 Posts
There are several ways you could do this. How many images are we talking about? How are they getting uploaded?
Several thousands images. Uploaded 10-100 per day. Via multiple files upload. One by one or package of files at once.
And they will be used in resource pages (news) or in photo gallery.
-
☆ A M B ☆
- 24,524 Posts
Unless these images are in a format that allows metadata, and has this information in the metadata, there is no way to do it.
Well, there might be one way. Are a given author's images uploaded into their own folders? In that case, if the folders are named with the artist's name you could use a snippet to get the folder name. Or if the folder name is based on a given resource, and that resource has the author's name in one of its fields or even a TV, or if the folder is based on a username or user ID... do you see the idea here? (I was going to say, do you get the picture? but that would be too obvious!) There has to be some way of associating the images with the author.
-
☆ A M B ☆
- 24,524 Posts
As far as custom media sources, the MIGX package comes with a very nice snippet, migxResourceMediaPath, for creating variable Media Sources from just one Media Source. For the path and URL, just put
[[migxResourceMediaPath? &pathTpl=`assets/images/{id}/`]]
There are a couple of options, you can have it create the {id} folder if it doesn't already exist with &createfolder=`1`.
You can use these resource fields as folder names:
- {pagetitle}
- {alias}
- {parent}
- {ultimateparent}
- {templatename}
- {breadcrumb}
-
☆ A M B ☆
- 24,524 Posts