using image type for hotel images and using standard size fr other images

This commit is contained in:
Shreesh Arora
2022-10-12 11:46:51 +05:30
committed by Shreesh Arora
parent b57126874c
commit fc3912d24e
21 changed files with 429 additions and 234 deletions

View File

@@ -295,7 +295,13 @@ class AdminTestimonialsModuleSettingController extends ModuleAdminController
if ($_FILES['testimonial_image']['size']) {
$testimonial_img_path = _PS_MODULE_DIR_.$this->module->name.'/views/img/hotels_testimonials_img/'.
$objTestimonialData->id.'.jpg';
ImageManager::resize($_FILES['testimonial_image']['tmp_name'], $testimonial_img_path);
$imageSize = ImageType::getTypeByName(ImageType::getFormatedName('small'));
ImageManager::resize(
$_FILES['testimonial_image']['tmp_name'],
$testimonial_img_path,
$imageSize['width'],
$imageSize['height']
);
}
}
if (Tools::getValue("id")) {