4m1g0
Forum Replies Created
-
Forum: Plugins
In reply to: [Bulk Resize Media] Image can't be viewed from Media after resizedThis bug is fixed in imsanity plugin:
https://es.wordpress.org/plugins/imsanity/
Don’t use this one anymore, because it’s just a copy of the imsanity plugin.
Forum: Plugins
In reply to: [Bulk Resize Media] Image can't be viewed from Media after resizedOk, I think the problem is here: http://plugins.svn.wordpress.org/bulk-resize-media/trunk/functions/ajax.php
in:
$resizeResult = image_resize( $oldPath, $newW, $newH, false, null, null, $quality);Function definition:
image_resize( $file, $max_w, $max_h, $crop, $suffix, $dest_path, $jpeg_quality );As we passed null for the $dest_path it generates the path: ‘image_780x1024.jpg’ which in some cases already exists… (that’s the problem)
Then we do:
unlink($oldPath); rename($newPath, $oldPath);So the image ‘image_780x1024.jpg’ is no longer available…
I’m testing this more deeply
Forum: Plugins
In reply to: [Bulk Resize Media] Image can't be viewed from Media after resizedI got this problem.
Let’s say you have an image ‘image.jpg’ 800×1030, as the image is larger than 1024 wordpress will make a copy of the image and store it like image_780x1024.jpg (it also makes other copies for sizes small, and medium)
When the plugin resizes the image to 780×1024, then you have two images: “image_780x1024.jpg” and the original “image.jpg” with the exact same size.
So I think wp remove the ‘image_780x1024.jpg’ copy because is now longer needed. BUT all posts where the image is referenced are not updated.
To solve this I restored a backup and set the max dimensions to 1025 intead of 1024. This way, as the original image keeps beeing larger than the 1024 copy, all is ok.
Does anyone have any idea of how this should be handled?
Have someone tested if Imsanity plugin has the same issue?