How to bulk shrink images in JIRA text fields

Description

When you want to paste a bunch of images to Jira comment, you may be supprised that you need to shrink them one by one just for better comment looking.
Here we have a script to save

Steps

Open Chrome Developer tools when the Edit modal box is opened

Select any image, execute the script and Save

var width = `80px`;
var height = `60px`;

var imgs = Array.from(document.querySelector(`.tox-edit-area__iframe`).contentDocument.querySelectorAll("img"));
imgs.forEach(img => {img.setAttribute(`width`, width); img.setAttribute(`height`, height);})

Make sure you select an image in the Modal dialog before clicking Save