On the WordPress Edit Image Screen, I’d like to add a label to show the current compression level and byte file size of the image.
Any ideas how to tap into this screen and echo this data?
The current settings show:
- Date
- URL
- File name
- File type
- Dimensions
I’d like to ad
- File Size
- File Compression (echo the current jpeg_quality setting)
You can try to use the
attachment_submitbox_misc_actions
filter to add more info to the box. Here is an example for the filesize part:The default file info is displayed with the
attachment_submitbox_metadata()
function through this action:in the file
/wp-admin/includes/media.php
This 2 functions will work with custom mime uploaded files (like PSD, EPS) when meta not avaible. It also returns more then just a lot of bytes, means, 2 decimal logic unit. The 99 places the info last in the meta box.