I would like to run some script to get the featured image's width and height after the user clicked 'Use Featured Image' button and use the data retrieved within the Post Edit screen. Is there such hook available for use in JavaScript? Otherwise, do you have other suggestions to achieve this?
Thanks for helping!
Edit : If there isn't any hook, I tried using the code below but clicking 'Set Featured Image' wouldn't trigger the event, presumably because it's a modal pop-up? Any ideas?
jQuery("#set-post-thumbnail").on("click", function(){
alert('clicked');
jQuery(document).on("click", '.media-button-select', function(){
alert('clicked button');
})
})