Uploading images to Google drive or other


(@SenpaiMass) #1

I have put this under uncategorized because i didn’t know where this would be fit.
Can we have additional options to upload avatars and images on others such as Google drive or even imageur instead of aws s3.


(Blake Erickson) #2

Hosting publicly linked to images on a service like Google Drive, Imgur, Dropbox, etc. is not really a good idea and none of them really want you to anyway. They all make it difficult to get the actual link to the image without all their gui around it. I don’t think this will ever be added to core as a feature, but maybe somebody could make a plugin if they really wanted to.


(@SenpaiMass) #3

With the imgur Api out , uploading and direct links would be possible ?


(Blake Erickson) #4

Yes it would be “possible” to use the imgur API, but someone would still have to build a separate plugin for this. I still don’t think its a good idea unless your intent is to have your images browsed for and commented on inside of imgur. Also imgur is rate limited quite a bit and you have to register your application: The Imgur API - General Information

Why do you want to use imgur? Why can’t you just host images on your own discourse server?


(@SenpaiMass) #5

Hosting on my own server is possible , but for example for a very large board it would consume a massive amount of space - avatars/profile backgrounds/post images etc. By using the free options or any other paid options other than aws s3 it could make thing easier :slight_smile:


(Blake Erickson) #6

Okay. If you have a very large board you are already going to be paying quite a bit for server hosting and S3 pricing would only be a small percentage of that.

S3 does have a 1 year free tier:

As part of the AWS Free Usage Tier, you can get started with Amazon S3 for free. Upon sign-up, new AWS customers receive 5 GB of Amazon S3 standard storage, 20,000 Get Requests, 2,000 Put Requests, and 15GB of data transfer out each month for one year.


(Blake Erickson) #7

If you are trying to stay on the cheap side, one solution might be to simply limit the file size to 1mb and turn off remote mirroring of images. Then if they wanted to post a large image they could go to whatever image/file hosting service they want and upload the image and then just paste the link into the post.

https://meta.discourse.org/t/change-the-maximum-file-upload-size/15159?source_topic_id=35518

(Matt Palmer) #8

Well, none of imgur, gDrive, etc etc etc is going to want you to consume a massive amount of their space for free, either. So you’ll probably go to all that work to set it up, only to have them suspend your account for a ToS violation. You’d be better off just working out how to get the few dollars per month to pay AWS.