Nice plugin, but to me, megapixels is a difficult thing to grok.
I had thought this was the same as megabytes (MB) but not so!
Imagine my surprise when uploading a 1280×720 size image, and it came out 965×543!
I had thought that a setting of .5 megapixels would be .5 MB, or 500K, which was a relatively safe file size for this particular project. I guess I should have taken the suggested 1.5 megapixel setting instead!
If this happens to you, here is a workaround.
Use FTP to upload your files back into the wp-content/uploads directory.
Then use the Regenerate Thumbnails plugin, and in theory, that should then re-establish your new dimensions for the images.
It can be cumbersome if you have set your Media Uploads to be month-based folders, incidentally, but overall this may save some work of re-uploading manually.
]]>It is difficult for most people to get the php module installed in shared hosting accounts, so I think it would be a good idea if the plugin could be optionally enabled to use the imagemagick command line program. Is this something you can do, or something I could possibly submit a patch for? Thanks!
https://www.ads-software.com/extend/plugins/limit-image-size/
]]>Landscape images appear correct. But portrait images are limited to 1024px and don’t scale in a proper way. As soon as i deactivate the plugin and retry the same image, it appears correct.
Any idea what can go wrong?
https://www.ads-software.com/extend/plugins/limit-image-size/
]]>Hi,
the SQL-statement:
$id = $wpdb->get_var(“SELECT ID FROM wp_posts WHERE guid LIKE ‘%”. $metadata[“file”] .”%’ LIMIT 1″);
in the function lis_adicionar_data($metadata) ist not the best way or not as flexibel as needed to get the ID for a post. The SQL-Statement only work in a standard installation where the table-prefix is “wp_”. In a lot of cases the table-prefix may be change or removed.
Since I didn’t know the correct wordpress API I can’t tell you a fix, but this maybe a hint for others.
Regards,
Dirk
https://www.ads-software.com/extend/plugins/limit-image-size/
]]>Hi,
I tried the plugin and found it a great helper.
Original Size and Final Size are the same since filesize is a cached value.
Following fix will help:
——-
diff -uNr limit-image-size/limit-image-size.php downloads/limit-image-size/limit-image-size.php
— limit-image-size/limit-image-size.php 2012-06-23 22:01:51.485743371 +0200
+++ downloads/limit-image-size/limit-image-size.php 2012-06-18 18:35:31.000000000 +0200
@@ -141,7 +141,6 @@
if ($imagem) {
$size = round(filesize($arquivo)/1024,2);
– clearstatcache();
$megapixels = $imagem[0]*$imagem[1];
$limite_mp = $limite * 1024 * 1024;
—-
Regards,
Dirk
https://www.ads-software.com/extend/plugins/limit-image-size/
]]>