
Originally Posted by
mc12345678
So now instead of an obvious display issue identifying that there is a problem with the image(s), an incorrectly loaded image will just not be resized and the store owner that doesn't/hasn't properly loaded the images to the site will be none-the-wiser until some other tool or resource identifies that the image(s) should be resized to optimize performance or there is some other effect on people selecting the site...
In other words, has anything really been solved? I bring this up also because other similar modifications have been discussed throughout this thread as well as in other threads, in fact if you look back at the history of the plugin errors have been uncommented before only to be again commented out like what has been "discouraging".
Generally though, the solution?! Follow the instructions...
Seems almost might be better to simply remove the plugin if it can not be used properly.
If, however, going to use code like above, I would recommend that the applicable image type constant be used to maximize compatibility and code understanding when comparing the image type against $image_type. Such as: IMAGETYPE_JPEG, IMAGETYPE_GIF, IMAGETYPE_PNG, etc. instead of just a number. Based on looking over a few other things it seems that if going to go to such extremes, then should also validate that the image is large enough to support evaluation with the applicable function so that won't throw another error that was just attempted to be prevented.
Bookmarks