Skip to content

[Feature Request] Image diffs (onion skin) in markdown

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

Problem to solve

Easily communicate differences between images anywhere you can use markdown (MR descriptions, comments, and issues)

Proposal

GitLab's existing "swipe" and "onion skin" diff tools for images (see gitlab-foss#24949 (closed)) are very useful for visualizing differences between similar images. However, they're currently only available when comparing commits in a merge request. This works great if the image files are being committed to your git repository, but if an MR author wants to show an onion view diff of images related to their MR (for example, before and after screenshots of what their app looks like with and without the changes introduced in their MR), they must either:

  • Commit (and probably revert before merge) the images in their current merge request
    • This is a bit cumbersome and pollutes your git history and repository size
  • Create a separate branch and MR where images can be committed
    • This is cumbersome managing different branches and MRs. Diffs can be linked from the original MR, but not viewed inline.

I propose having some kind of markdown syntax to allow diffing 2 images with swipe and onion skin tools in an MR description or comment (and anywhere else you can use markdown).

The syntax and rendering could look something like this for an MR description:

## Description

This MR changes button from blue to red.

### Screenshots/Preview

imgDiff { ![image1](https://gitlab.com/blue.png)  |  ![image2](https://gitlab.com/red.png) }


### Resources

* Jira Ticket - 
* Link to Figma -

image

Intended users

Software Developers, Product Managers, Product Designers, Software Engineer in Test

Feature Usage Metrics

Does this feature require an audit event?

Edited by 🤖 GitLab Bot 🤖