Hiding Image URLs (Rails 3)

BACKGROUND: Each user has their own Facebook profile picture URL associated with their account. This image is invoked with <%= image_tag(@user.facebook_image_url) %>. Each Facebook user URL has the following form: http://graph.facebook.com/123456/picture - with 123456 being a specific Facebook user identification number.

PURPOSE: I would like other users to not be able to figure out which of the users by simply right-clicking “copy image URL” and looking at the identifier in the image URL.

Is there a gem / plugin or better way to accomplish this other than uploading a user image from Facebook servers?

+3
source share
1 answer

AFAIK, there are only two options: either you upload the image, as you say, and send it to the browser using your own URL, or you let the browser do the work, in which case the browser (and the user) must know the URL.

See Get a real Facebook profile profile URL . Facebook seems to be doing some sort of redirection. Perhaps you can use this for your purpose.

+1
source

All Articles