Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Image Attribution is a module that looks for Attributions for images in an image's alt field. This is particularly useful for news and content websites that use and image and need to give proper credit to the image's author or content owner. (For example, you could cite Getty Images as the source of an image, or an individual photographer, or an image shared under a CC-License, etc.)

This code is based on the outstanding work of the Image Caption module by David Thomas.

Currently, the module has a few limitations that I'm trying to figure out how best to deal with:
-Currently, there isn't any support for making your attributions into links, just plain text.
-It can work with Image Captions, but it takes a little doing to get that going.
-You'll have to style it with CSS yourself.
-You'll have to use a WYSIWYG editor. This has only currently been tested with TinyMCE, although in theory, it should work with others as well.

That being said, I think a lot of people could find this to be a very useful module, so I figured I would upload and share it.

Getting Image Attribution to work
Seeing as the code is based on Image Caption, the instructions are just about the same for getting Image Attribution to work.

1. First, after enabling the Image Attribution module, go to the css of your WYSIWYG editor, and add .attribution{} to the stylesheet you're using.
2. Every time you want to give an attribution credit, set the class of the image to attribution. This can be done in a number of ways.

Getting Image Attribution to work with Image Caption
Setup is relatively simple, but for now you must set this up manually every time you want to have both a caption and an image attribution. I've taken special care to ensure that the two modules do not conflict.

1. Make sure you have both modules set up and working.
2. When you want to have an image with both a caption and attribution text, declare multiple classes for it. So, instead of "attribution" or "caption", you would put "caption attribution". As a TinyMCE and IMCE user, this is as simple as clicking on the image, going into IMCE, and clicking "value" and entering "caption attribution" for the value.

Project information