troyrob Posted March 19, 2012 Share Posted March 19, 2012 Hi i have a question about image resizing. I know prestashop already downscales images to fit the parameters defined. i.e. Image size defined is 1500x1500, i upload an image 2500x2500 and it gets resized down to 1500x1500 No problems so far However if i upload a 750x750 image i get tons of white space around images (i.e. does not scale up). I know this can potentially look ugly if not done correctly. But what file(s) do i modify to achieve this effect Link to comment Share on other sites More sharing options...
troyrob Posted March 20, 2012 Author Share Posted March 20, 2012 Yes, i have been looking at the images.inc.php file. But i'm really unsure what to change. Link to comment Share on other sites More sharing options...
win83max Posted December 3, 2012 Share Posted December 3, 2012 (edited) Hi i have a question about image resizing. I know prestashop already downscales images to fit the parameters defined. i.e. Image size defined is 1500x1500, i upload an image 2500x2500 and it gets resized down to 1500x1500 No problems so far However if i upload a 750x750 image i get tons of white space around images (i.e. does not scale up). I know this can potentially look ugly if not done correctly. But what file(s) do i modify to achieve this effect Hello, First of all, I apologize in advance for my English. order cropper images (products, categories, .....) in prestashop 1.5, you must file maudifier classes / ImageManager.php the following code which is line 153 : if (Configuration::get('PS_IMAGE_GENERATION_METHOD') == 2 || (!Configuration::get('PS_IMAGE_GENERATION_METHOD') && $width_diff > $height_diff)) With the following code: if (Configuration::get('PS_IMAGE_GENERATION_METHOD') == 2 || (!Configuration::get('PS_IMAGE_GENERATION_METHOD') && $width_diff < $height_diff)) Then go to your Back Office> Preferences> Images, and rebuild your photos. I hope this has helped you. Cordially Mathieu ------------------------------------------------------------------------ En français : Bonjour, Tout d'abord, veuillez m'excuser par avance pour mon anglais. pour pouvoir cropper vos images (produits, catégories, .....) sous prestashop 1.5, il vous faut maudifier le fichier classes/ImageManager.php le code suivant qui est à la ligne 153 : if (Configuration::get('PS_IMAGE_GENERATION_METHOD') == 2 || (!Configuration::get('PS_IMAGE_GENERATION_METHOD') && $width_diff > $height_diff)) Par le code suivant : if (Configuration::get('PS_IMAGE_GENERATION_METHOD') == 2 || (!Configuration::get('PS_IMAGE_GENERATION_METHOD') && $width_diff < $height_diff)) Puis rendez vous dans votre Back Office > Préférences > Images, et regénérez vos photos. En espérant que ceci vous aura aidé. Cordialement Mathieu Edited December 3, 2012 by win83max (see edit history) Link to comment Share on other sites More sharing options...
melomaniac13 Posted May 18, 2013 Share Posted May 18, 2013 Thanks win83max !! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now