I am trying to figure out if it's possible to rename images "on the fly" - by that meaning if you can do some sort of rename function, so in code the imagenames are changed, but the orginal image name is not.
Example:
I have a database with a table containing 2 rows, like this:
new_diverse id tekst active pic
----------------------------------------------
Row1 1 yellow 1 testimage.jpg
Row2 2 green 1 testimage.jpg
<img src="/images/testimage.jpg" />
Let's say on page yellow.php the row id # 1 is called and on page green.php, row id # 2 is called.
Both rows link to the same jpg image, but I would like for the code (the ) to have the color from the "tekst" in the table as filename instead, so if you right click the image, properties would state that the filename would be eg. green.jpg instead of testimage.jpg - is this possible?
Someone told me that GDlib perhaps could do the trick, but I have no knowledge of this.
Thank you so much in advance
EDIT --
Sorry for the late response to update this question.
What I am trying to accomplish by doing this is in regards to SEO. I'm in the process of developing a website with several languages (I believe it'll be in 10 languages, when done). For each page there will be images, and I would like to be as good in SEO as possible and therefore I would like to have the images named in their respective languages without having to make 10 identical copies of the images only with the filename in difference. Therefore I am looking for a way to write a filename in a specific language "on the fly".
E.g. I have an image named "2012-nice-red-mustang.jpg" in my root folder on my webhotel. When I access my page in english, the filename of the image would be as the original, but when viewing the spanish page with the image, the filename has been renamed to "2012-bonito-rojo-mustang.jpg" (where the translated filename is retrieved from a table in a database).
I hope this clarifies the problem and what I am trying to do.