Open jacobobryant opened 2 years ago
I've been looking at Cloudinary -- the Free plan is 25 Credits - 25 Monthly Credits 1 Credit = 1,000 Transformations OR 1 GB Storage OR 1 GB Bandwidth
The transformations would be interesting to look into. Though a downside of using those would be that Platypub couldn't be used with other S3 providers. (I like using DigitalOcean's S3 clone in particular since it's easy to set up and I already host all my other stuff there anyway--presumably having it in the same datacenter also makes uploads fast, not that that's a huge concern). Since Platypub has a backend already, maybe best to stick with that for any image transformations.
OTOH (there's always another hand!), we're already tied to specific providers for hosting and newsletters, so requiring a specific S3 provider wouldn't be the end of the world. I guess it just depends on how useful the transformations are--if it saves a lot of time, sure; if it would only take a few minutes to implement the same on Platypub's backend, might as well do that.
Currently we use a text input, and after you save and the page reloads, we show a preview:
We already have an endpoint for uploading an image to S3. It's used in the post editor (tinymce). Currently when I want to upload an image for one of the image text fields (both posts and sites have an image key), I go to a post, upload an image, copy the url, and omit actually putting the image in the post.
There might be some drop-in js image component we could use. It would also probably not be too hard to just use a normal file input and submit it with htmx, inserting the image preview to the dom once it finishes uploading.
However I do kind of like having the option to paste in a url, for times when I already have an image hosted somewhere. Maybe there's a js component that handles both urls and uploads. Or we could just use both a native text input and file input together, and try to make it not look too ugly.