LC667
LC667

Reputation: 3

Amazon S3: How to use SEO-friendly URLs for Images

we are using Amazon S3 for displaying images on our website. Right now, the images are saved with the keys:

myimages/193-image-small.jpg
myimages/193-image-large.jpg
myimages/194-image-small.jpg
myimages/194-image-large.jpg

and so on...

I can embed an image in my page with a code like this:

<img src="s3-zone.amazonaws.com/mybucket/myimages/193-image-large.jpg">

This is working nice and properly but I want to go a step further and display SEO friendly picture URLs for google like:

s3-zone.amazonaws.com/mybucket/myimages/193-super-great-title-for-my-picture.jpg

Is that in any way possible to implement and if yes - how?

Upvotes: 0

Views: 1769

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269490

This is not possible. Each object in Amazon S3 has one Key Name.

Some options:

  • Rename the objects to the name you desire, or
  • Point the URLs to your web server, which can translate the URL to the 'normal' URL and retrieve the underlying S3 object -- but this will put load on your web server rather than sending all requests to S3

If you want to be SEO-friendly, it's much better to add an alt field to the img tag. That counts more than filenames.

For example, see: How to Optimize Images for Better Search Engine Rankings

Upvotes: 1

Related Questions