Image uploading
Open, NormalPublic



Allow users to upload images to their WriteFreely instance.


Users should be able to:

  • Upload photos while composing a post in the web interface (T659 / T849)
  • View a library of their photos on a new Photos tab
  • Add a caption to each photo in their library, stored in the database
  • Store image size, original filename, and upload date for each photo in the database
  • Delete photos in their library

Admins should be able to:

  • Enable photo uploads by configuring a storage backend (T687)
    • For this task, we'll only support the local filesystem (T688)
  • Configure an upload quota for all users

Event Timeline

matt triaged this task as Wishlist priority.Dec 6 2018, 1:39 AM
matt created this task.
matt raised the priority of this task from Wishlist to Normal.Apr 6 2019, 6:49 PM
matt added a project: SnapFreely.
matt added a subtask: T546: Custom blog avatar.
matt changed the status of subtask T659: Drag-and-drop uploading from Waiting to Open.Jul 8 2019, 4:03 PM

I was looking around the other day for image processing libraries written in Go. There are some to compress or change format of the image, resize, etc.

One that I think would be important is watermarking (layering author handle or logo on image), I will try to come up with a function to implement that. Also thumbnailing part is important: in my small WordPress plugin I used to resize image by shorter axis and then provide jQuery based dialog to select which area from longer axis to keep thus making sure all thumbnails are the same dimensions. Is there any particular workflow how thumbnails are handled in

Is anyone already working on image backend part just not to duplicate work? If not yet, I will start drafting some functionality (I'm new to Go lang, but this would be good chance to learn) :)

So I have wrote a piece of code for image watermarking: takes JPEG file as input, uses PNG with transparency as watermark image and saves the output. Plan to release it as separate library with following functionality:

  • Watermark image - layer PNG on top of photo with desired transparency (done);
  • Move original image to non-public location (for backup) keeping watermarked image in public location;
  • Create year-month based directory structure (similar as WordPress have) for uploaded images;
  • Resize uploaded image.

If anyone has ideas would be great to hear :)

Initial version of library ready - it is able to watermark image as described in 1st bullet point.

go get -d -u

See this example how to use the library.