[RFC] Fetch and store external images

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

[RFC] Fetch and store external images

Post by igorw »

Description

The idea of this feature is to allow optionally fetching any external images specified in posts, signatures, avatars and storing them.

Remote avatars would be auto-converted to local avatars. Linked images to attachments.

An alternative option (suggested by bantu) would be to merely cache these images and re-fetch them every now and then. But that brings a lot more issues (cron, dying images, etc...)

Advantages

Why do this?
  • Faster responses
  • Less reliance on external servers
  • Detect broken images
  • Detect password protected images
  • Images cannot die
Disadvantages

Why not?
  • Requests to arbitrary site could be abused (already possible via remote avatar upload)
  • Some people like / want / need direct links (for example signatures showing "your IP", images with dynamic statistics...)
Challenge / tricky
  • How to store signature images
  • How to store such images in MODs (API?)

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Fetch and store external images

Post by EXreaction »

I don't think it's a good idea to do this for avatars/signature images. Then if the user would setup a link to the image they want to use on all the sites they are on and decide to change the image by replacing it, the image would not update on some sites (confusing and annoying the user).

I would say the perfect implementation would use javascript to check if the original source fails to load and load it from the server cache instead.

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Fetch and store external images

Post by igorw »

They could use gravatar for that.

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: [RFC] Fetch and store external images

Post by Danielx64 »

igorw wrote:They could use gravatar for that.

But there something else, there could be something out there that does not support gravatar. Just something to keep in mind

phynixx
Registered User
Posts: 22
Joined: Thu Sep 22, 2011 12:18 am

Re: [RFC] Fetch and store external images

Post by phynixx »

Re-hashing an old and potentially dead topic I think the original concept before the talk of avatars was a useful one.

If an image is externally available, and if a user wants to upload it (for avatar use or anything else) they currently have to:
  • 1.) Download the image
    2.) Perform the appropriate downgrading of dimension/size
    3.) Upload the image
Since we know the minimum & maximum dimensions/size requirements from the DB how about we allow the following instead:
  • a.) Upload the image *here*, OR
    b.) Enter the URL here and we will grab it and if it doesn't meet the min/max requirements we'll resize it
The pros/cons of caching and such can be debated elsewhere but the original concept of "Fetch and store external images" would be a very handy one I think.

phynixx
Registered User
Posts: 22
Joined: Thu Sep 22, 2011 12:18 am

Re: [RFC] Fetch and store external images

Post by phynixx »

igorw wrote:An alternative option (suggested by bantu) would be to merely cache these images and re-fetch them every now and then. But that brings a lot more issues (cron, dying images, etc...)
IMO the option to cache the images is a valid one however it should be separate from the feature/functionality of "Fetch and store external images". The former provide a service and could produce a stock "I've detected that your image is no longer available" message whenever the link becomes invalid. The latter is really a time-saving measure that eliminates a few tedious steps in an already available feature (image uploading).

My .02.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Fetch and store external images

Post by brunoais »

phynixx wrote:Re-hashing an old and potentially dead topic I think the original concept before the talk of avatars was a useful one.

If an image is externally available, and if a user wants to upload it (for avatar use or anything else) they currently have to:
  • 1.) Download the image
    2.) Perform the appropriate downgrading of dimension/size
    3.) Upload the image
Since we know the minimum & maximum dimensions/size requirements from the DB how about we allow the following instead:
  • a.) Upload the image *here*, OR
    b.) Enter the URL here and we will grab it and if it doesn't meet the min/max requirements we'll resize it
The pros/cons of caching and such can be debated elsewhere but the original concept of "Fetch and store external images" would be a very handy one I think.
I'll go for this.
Using external images: OK.
Cache them in the server for special cases: NOOK (?)
Anyway, if one wants to add an external image it's easy with the UNIX I already experienced (Fedora & Ubuntu). Just type the url in the file picker and the OS takes care of downloading to a temp place and then add it to the form.
I don't actually see a need in this, still, seems like a good idea for a mod.

Post Reply