When I am creating/editing a post and set the featured image, I’d like to display a message to the screen if the file dimensions or size are below a certain threshold. But I want the featured image to still be set.
The message is simply a reminder to myself if I have set a featured image that doesn’t meet certain criteria. I need to do this BEFORE saving the post, ideally right after I set the featured image.
I couldn’t determine which add_filter
I would use in my child functions.php to display a message at this point.
I found this example ( https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/#user-contributed-notes ) but couldn't get it to work.
Do you have a recommendation?
UPDATE: It turns out that admin_post_thumbnail_html filter no longer works in WordPress > 5.0 : https://core.trac.wordpress.org/ticket/45688 And doing something comparable since 5.0 seems convoluted/requires javascript: https://github.com/danielbachhuber/gutenberg-migration-guide/blob/master/filter-admin-post-thumbnail-html.md