Hotlinking Images? No. Wget Instead.

There's an open feature request for the Embedded Media Field to allow editors to link to a live image on any arbitrary site. Although this is technically possible, and easy to implement in the module's framework, this practice is also known as hot-linking, and I'm not particularly interested in enabling that sort of functionality.
However, the discussion on that queue did lead to another interesting possibility. Using file_get_contents (or maybe more efficient method?), I can 'wget' an image and store it to the server. Then the image can just be served locally. I was already examining that possibility for storing (YouTube, Blip.TV, etc.) video thumbnails as well, so I should be able to sign off on two tasks with this mini-project.
It opens up the possibility of copyright violation, but I leave it to the lawyers to fight over that one. And though there are certainly some cases where a hotlink implementation might be okay, I'm personally not interested in encouraging that.
Aaron

Contact Us

About Aaron Winborn

Aaron Winborn was Advomatic's first full time hire in 2006, and is a very active leader in the Drupal community. His first book, Drupal Multimedia is now available from Packt Publishing.

AdvoTwitter

  • RT @eff: If you're a U.S. citizen who lost non-infringing personal files to #Megaupload, please contact us here: http://t.co/O5QDEDYu
    February 3, 2012 - 6:34pm
  • RT @mlsif: Wael @Ghonim and David Gergen at JFKForum on Revolution 2.0 #tahrir #Egypt http://t.co/OPj2ysKp
    February 3, 2012 - 4:21pm
  • RT @ravenb: A cautionary tale: How Komen flushed their brand in 24 hours http://t.co/3u8BjBXZ #p2 #fem2 #nptech
    February 2, 2012 - 9:15pm
  • Hiring a #drupal developer! Come work with us (live anywhere) http://t.co/7bZFtXcj
    February 2, 2012 - 5:01pm
  • RT @abigailcollazo: We're proud to be hosting the Women's Caucus at #Roots12! Join us if you care about women's participation and...
    February 1, 2012 - 6:20pm