Skip to content

GitLab Next

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,143
    • Issues 43,143
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,355
    • Merge requests 1,355
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

GitLab 15.0 has launched! Please visit Breaking changes in 15.0 and 15.0 Removals to see which breaking changes may impact your workflow.

  • GitLab.org
  • GitLabGitLab
  • Issues
  • #218529
Closed
Open
Created May 20, 2020 by Jacques Erasmus@jerasmusMaintainer

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.

Intended users

  • Parker (Product Manager)
  • Presley (Product Designer)

Proposal

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
    • jpg/jpeg
    • gif
    • png
  • A description is optional
  • Images are uploaded to a default directory
    • Something like /source/images/uploads

Questions

  1. Can we support relative links prior to generating the image? How would we preview the result if there was no direct URL to reference?
  2. Is referencing a URL directly any kind of security risk?
  3. Where do we store uploaded images?
  4. Should we make the upload directory configurable?
  5. What happens if an image with the same file name already exists in the target directory?
  6. When clicking Save Changes, should newly inserted images be added to the MR that gets created?
  7. If newly inserted images are added to an MR before we add it to the master branch, how do we reference it in the SSE (what happens to the URLs once it gets merged)?

Designs

  • Design: #218529[Upload_image_file.png]
  • Figma: https://www.figma.com/file/RhYal9t4OZk7IeYsSvEHpW/WYSIWYG-markdown-editor-214559?node-id=433%3A23582

Links / references

Edited Jun 16, 2020 by Michael Le
Assignee
Assign to
Time tracking