qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Upload image from a URL, not just a local file

Open cellio opened this issue 5 years ago • 2 comments

https://meta.codidact.com/posts/280123

If you want to use an image in a post that's out there on the web somewhere, you have to either download it first so you can then upload it for your post, or use the image from the other URL. The first is extra work and the second is potentially fragile; if the image goes away later, the post is left with nothing. We would prefer that all images in posts be hosted by us.

This has been discussed before and Manasseh (who I can't find a GH user for) has ideas about how to do this. But we never filed an issue, so I'm doing that now so I can do the right tracking things elsewhere.

cellio avatar Dec 28 '20 23:12 cellio

"who I can't find a GH user for" - I'm here. For a URL, the server-side application should read the contents of the URL immediately and verify basic criteria (.png, .gif or .jpg file type, below maximum size) and then save to S3 just like an uploaded image. There are some additional steps, which I have suggested in the forum and other places, but those will be the same for uploads or for URL-loaded images - things like default display size, resize & save on S3, crop/rotate (90/180), etc. but those will be separate issues.

manassehkatz avatar Dec 29 '20 05:12 manassehkatz

(Weird -- I thought you were here but GH autocomplete wasn't working its magic.)

I agree we should separate the additional steps, which would benefit both paths. For this issue, treating an image that comes via URL the same way we treat one that's uploaded is sufficient -- check type, size, whatever else we check, store, embed link in the post.

cellio avatar Dec 29 '20 16:12 cellio