How to find the id of an image
If you want to find the id of an image (photograph, pic, jpg, png, bmp…) on a WordPress page or post, just click on Media on the left menu and when the pop-up Media screen shows you can move your mouse cursor over the words title, edit or delete (without clicking) and see the id in the status bar (lowest line or part of the internet program’s screen) of the browser.
WordPress 6.1: If you click on the image in the media library, you can then just look at the number in the URL area of your browser.
If you can’t see the words title, edit or delete you may need to click on show first then try moving your cursor over those words.
There are also some WordPress plugins you can install from the left plugin menu after clicking “add new” to show the IDs.