Improve image attachment in markdown editor

What does this MR do and why?

This MR improves image attachment in markdown editor:

  1. Always applies image dimensions
  2. Respects @2x postfix for retina images
  3. Uses the same logic for both pasting and dragging images into textarea

Screenshots or screen recordings

Before After
CleanShot_2025-10-29_at_13.28.47 CleanShot_2025-10-29_at_13.26.10

How to set up and validate locally

  1. Open any issue
  2. Attach a non-retina image by dragging the image into textarea
  3. Observe image dimensions in the markdown
  4. Attach a retina image (captured by macOS internal capture tool) by dragging the image into textarea
  5. Observe retina image dimensions
  6. Attach a retina image with @2x postfix in the filename by dragging the image into textarea
  7. Observe retina image dimensions
  8. Repeat the steps but now paste the images instead of dragging

Merge request reports

Loading
Loading