This video tutorial shows how to get the image (attachment) ID to use it in the shortcode for WordPress templates.
Log into WordPress admin panel, navigate to Media click on Library.
Switch from Grid View to List View, then mouse over the image, you will see an image ID in the bottom.
Open the image, and copy this image ID from the URL in your browser address bar.
Feel free to check the detailed video tutorial below:WordPress. How to get the image (attachment) ID to use it in the shortcode