Prevent inserting images from other websites (flickr, facebook...)

We ara a forum about photography.

We want people to upload the photos to our site, from their computer or an url.

But we want photos to reside in our servers, not display photos from other sites like Flickr.

But people are used to insert Flickr BB code and insist in using code like:

[url=https://flic.kr/p/2g9UvZW]![](upload://eXjRQZJ5qiWX2vxVhDWDJ1Zftsj.jpeg)[/url]
[url=https://flic.kr/p/2g9UvZW]Libros con farol...[/url] by 
[url=https://www.flickr.com/photos/jcrla/]JAVIER[/url], en Flickr

How can we prevent this?

It would be great if the system transformed the xxxx into a inserted image uploaded from corresponding url.

1 Like

Add *flic.kr*, *flickr.com* etc inside the watched word field at /admin/logs/watched_words/action. You can choose to block the words (users will see a warning if they try to add those kind of links), or you can choose from the other available options.

In this case you can choose the “censor” option.

2 Likes

It seems not that complicated to implement, technically. But, there would probably be a legal/copyright problem: If the user didn’t upload the image to your forum and only provided a link, you don’t have IMHO the right to do that without his consent. You could maybe insert a clause in your TOS for that. I don’t like this idea very much, but you would then probably be OK.

Daniela’s solution works without any consideration like this, but it’s less nice in term of user experience :frowning:

1 Like

See site setting download remote images to local: Convert remote images to local images by downloading them; this prevents broken images.

3 Likes

That’s a function available by default in Discourse ?
What do you think about the legal aspect mentioned above ?

2 Likes

Legally what is illegal is hotlinking, showing an image in your forum that is hosted in another site.
You ar consuming their bandwidth, and if you have no rights to do it, you are breaking legal rights.

In the case that the owner of the image in Flickr is linking the page in our forum, I don’t see any legal issue.

Users of our forum, accept giving us the right to show their images in it.
Thus we are more confident with images uploaded to our forum.

And linking images has other problems: if they delete or change access rights to that images, or simply delete their Flickr account, they break image visibility in our forum.

@pfaffman I have that option activated, you can see the image is not shown from Flickr, but from our forum after downloading it (see image insertion code between url tags).

May be I have explained it incorrectly, you are right, that parameter is of great help, for us.

The problem is that the system keeps the url surrounding the image, so when you click in it it directs you to Flickr and does not show it in the lightroom.

We want to prevent that, we want the image to be displayed in our forum.

We don’t mind if the user puts a link to the original image in Flickr (the other url tags surrounding the title) but we want the lightbox to work and the image to reside in our site.

In other words, thy system should have converted the bbCode to this (when you activate “download remote images to local”):

![](upload://eXjRQZJ5qiWX2vxVhDWDJ1Zftsj.jpeg)
[url=https://flic.kr/p/2g9UvZW]Libros con farol...[/url] by 
[url=https://www.flickr.com/photos/jcrla/]JAVIER[/url], en Flickr

Not letting you surround the image by …. or show you a link icon next to the image, but not disabled the lightbox when you click on the image.

2 Likes

Thank you Daniela.

That may be an option, don’t let them use Flickr at all.

But giving the path to the Flickr original file is ok for us, but we want the image to be shown from our site, and lightbox work on our forum, don’t take our users to Flickr (or other similar sites) when they click in the image, just show it in the lightbox.

1 Like

sometimes, a gif is too big, someone posts it,

too big , not uploaded to the site. but still nice to be able to show it from the original url …