WordPress: How to get a list of all the possible thumbnail sizes in a theme

Is there a function I can use to get the dimensions of each image size defined in a theme? Yes, there is 😁 😁

Since WP 4.7, you can use wp_get_additional_image_sizes() to get additional image sizes detected (apart from the default image sizes added by WP).

Since WP 5.3, you can use wp_get_registered_image_subsizes() to get all the registered image sizes.

get_intermediate_image_sizes(); // get all the image size names.
wp_get_additional_image_sizes(); // get all the additional image size data.
wp_get_registered_image_subsizes(); // get all the image size data.