Plugin interferes with wp_generate_attachment_metadata()
-
Hello.
Your plugin interferes with wp_generate_attachment_metadata() WordPress function (wp-admin/includes/image.php).
When reSmush.it is active, wp_generate_attachment_metadata() returns (bool)true instead of Array with metadata. Converted to string it means “1” in the database.
If plugin like “Regenerate Thumbnails” is used while reSmush.it is active, all metadata for images gets removed from the database.
Steps to reproduce:
1) Install and activate reSmush.it plugin
2) Install and activate “Regenerate Thumbnails” plugin
3) Regenerate ALL thumbnailsOR
1) Install and activate reSmush.it plugin
2) Try to return value for one of images with the following code:
require_once( ABSPATH . ‘wp-admin/includes/image.php’ );
var_dump( wp_generate_attachment_metadata( ‘39715’, ‘/var/www/website/wp-content/uploads/2019/01/image.jpg’ ) );Don’t give me your usual bullshit about custom Media Libraries or galleries – I have none!
Your plugin leads to removal of all attachments metadata. Deal with it.
- The topic ‘Plugin interferes with wp_generate_attachment_metadata()’ is closed to new replies.