Upload an image using the Static Site Editor
Problem to solve
In the 1st iteration of adding the ability to insert images using the Static Site Editor, we discussed storing the image contents as base64 encoded string within the file that's being edited.
Storing the image contents in this way is not ideal and has some clear drawbacks that should be addressed before we implement this feature.
When inserting an image via the Static Site Editor we should not permanently store the image contents in the file that's being edited. We should add the image to an MR and store it in the project repo once the MR is merged.
What does success look like, and how can we measure that?
When images are added via the Static Site Editor the contents should not be stored in the Markdown file that's being edited. Ideally, images should be added to an MR and stored in the project repository once the MR is merged.
The Markdown file should reference the added images in the project repo.
Uploading a new image
- A user should be able to upload any image from the supported file formats
- A description is optional
- Images are uploaded to a default directory
- Something like
- Something like
- Can we support relative links prior to generating the image? How would we preview the result if there was no direct URL to reference?
- Is referencing a URL directly any kind of security risk?
- Where do we store uploaded images?
- Should we make the upload directory configurable?
- What happens if an image with the same file name already exists in the target directory?
- When clicking
Save Changes, should newly inserted images be added to the MR that gets created?
- If newly inserted images are added to an MR before we add it to the
masterbranch, how do we reference it in the SSE (what happens to the URLs once it gets merged)?