Metadata Width/Height not updated after resize
-
WP 4.4.2 Imsanity 2.3.6
It seems this plugin version does not update the metadata Width/Height fields in /imsanity/libs/utils.php > function imsanity_image_resize()
// Get MetaData with wrong W/H:
$ay_metadata = wp_get_attachment_metadata( $attachment_id, true );// Load WP-ImageEditor (WP 3.5+)
$editor = wp_get_image_editor(get_attached_file($attachment_id));// Get correct W/H
$ay_imgrealdim = $editor->get_size();// Cache real Width/Height
$ay_metadata['width']=$ay_imgrealdim['width'];
$ay_metadata['height']=$ay_imgrealdim['height'];// Save MetaData with correct W/H
wp_update_attachment_metadata( $attachment_id,$ay_metadata);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Metadata Width/Height not updated after resize’ is closed to new replies.