Hosting theme images on amazon s3, how to call images

I am going to host some of my images from my theme on the amazon s3 server. I am trying to figure out how to get my theme to get those images. In the theme currently, the images are part of the css, and it calls them with url(images/imagename.jpg), from the server that the site is hosted on.

I am trying to figure out what I need to put in place of that to get the theme to take the images from the url my amazons3 account instead of my site server.

For example my images will be at something like:

Does this make sense?


Usually you just need to specify an absolute pathname to the image.



However you would need to refer to your hosting terms and requirements for the exact paths needed.

Some info here:

Hello and thanks for your help with this. Yes I tried specifying the absolute path to the image, exactly as you showed. Unfortunately that didn’t work, and is where I’m at now, trying to figure out what to do. I checked the links you posted but didn’t see a solution there. I’ll keep looking around on the net and call my host server as you suggested.

I tried to set up with S3 but found it too confusing. So I went with Rackspace Cloud services and have not looked back. Very simple and clear, and similar price—just a few cents a month, which is amazing.

I finally figured this out. You were correct about the absolute paths. I had tried it but it wasn’t working, and then I discovered I hadn’t set the permissions for the images, so they weren’t being displayed.

All fixed now :slight_smile:

Glad you fixed it and thanks for posting your solution :slight_smile: