Announcement

  •  » Extensions
  •  » Is there a way to use Amazon S3?

#1 2011-03-10 17:39:44

fotochuk
Member
2011-03-10
3

Is there a way to use Amazon S3?

I am currently using Amazon S3 to host all my images for my Wordpress site.  But I need a gallery and I love what I see at Piwig.  However my host is very basic and too slow in my opinion.

Is there a way to use Amazon S3 for the source for my images?  I can automate (cron job) the replication of my images from Piwig to Amazon S3, but I am not sure if there is a plugin to or a way to substitute the image URL for the Amazon copy.

Any ideas?

Offline

 

#2 2011-03-11 09:14:31

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Is there a way to use Amazon S3?

Hi fotochuk,

I don't know yet how Amazon S3 works. Do you have an HTTP location for each of your files stored on S3? If yes, you can replace the images.path column in the database.

Offline

 

#3 2011-03-11 11:22:47

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Is there a way to use Amazon S3?

I think the fastest way is to use "remote sites" in piwigo
- look at tools/create_listing_file.php and create the output of this script on your S3 bucket
- piwigo will load this output from S3 and create links to S3

Offline

 

#4 2011-03-11 11:36:53

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Is there a way to use Amazon S3?

rvelices wrote:

I think the fastest way is to use "remote sites" in piwigo

Considering the thumbnail and high definition URL are calculated from the "web size" images.path value, isn't it a problem for S3?

Offline

 

#5 2011-03-11 13:35:45

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Is there a way to use Amazon S3?

plg wrote:

rvelices wrote:

I think the fastest way is to use "remote sites" in piwigo

Considering the thumbnail and high definition URL are calculated from the "web size" images.path value, isn't it a problem for S3?

No because there is a standard file structure on S3.
However probably the best solution overall would be to change the hoster to a faster one.

Offline

 

#6 2011-03-11 16:54:15

fotochuk
Member
2011-03-10
3

Re: Is there a way to use Amazon S3?

rvelices wrote:

I think the fastest way is to use "remote sites" in piwigo
- look at tools/create_listing_file.php and create the output of this script on your S3 bucket
- piwigo will load this output from S3 and create links to S3

When I try this, I get an error that isn't very helpful.

"an error occurred :"

Offline

 

#7 2011-03-11 17:15:17

fotochuk
Member
2011-03-10
3

Re: Is there a way to use Amazon S3?

plg wrote:

Hi fotochuk,

I don't know yet how Amazon S3 works. Do you have an HTTP location for each of your files stored on S3? If yes, you can replace the images.path column in the database.

The easiest way to explain it is probably explain how it works in wordpress.  There are now several plugins that all essentially do the same thing.

1. you let wordpress behave normally and it saves media files on its normal server as expected.
2. you have a plugin or in my case an sh script that selectively copys/syncs certain file types and directories to amazon S3.
3. you have a Cname DNS entry on your host to the amazon S3 directory.
4. you have a plugin (can be the same one as number 2) that selectively replaces URLs in HTML for the S3 version of the URL.

This makes loading photos really fast compared to a shared hosting service.  My intent with pwigo is to do the same above but for all JPG, JPEG, CSS and JS  files.

Unfortunately I am really a rookie at PHP.  I can extend my SH script on number 2 to Piwigo no problem.  But swapping out the URLs for the in the PHP is beyond me.

There are two urls below that link to the same photo, one from my shared server and the other from amazon.  you can also see the URL I used in the CNAME entry to keep the files looking like they belong to my site.
shared host jpg
Amazon S3 jpg
the post that has jpg source substituted.

Offline

 

#8 2013-02-10 14:30:16

Oscar
Guest

Re: Is there a way to use Amazon S3?

Up!

Is there any update on this? An extension to replace image.path would be perfect!

 

#9 2014-12-24 09:25:04

GeekPete
Guest

Re: Is there a way to use Amazon S3?

Piwigo really does need good cloud support (Amazon AWS/S3, others) as well as really well oiled CDN support via a plugin or in the core.

This will take it to the next level for people to slap it in and have it scale easily out of the box using new technologies.

 
  •  » Extensions
  •  » Is there a way to use Amazon S3?

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact