- Posts: 4
COMMUNITY FORUM
How to remove the extra load in K2.7 image?
- Мурат
-
Topic Author
- Offline
- New Member
Less
More
8 years 10 months ago #156000
by Мурат
How to remove the extra load in K2.7 image? was created by Мурат
Greetings.
K2 many unnecessary loads on the server image (original image folder ./media/k2/items/srk/ and 6 images in folder / media / k2 / items / cashe /)
How to remove the original boot image and some of the other?
I just need L, S, XL.
Before commenting on the older versions of the original image commented in line /administrator/components/com_k2/models/item.phpand everything was fine.
On K2.7 this does not happen, if the comment on the line, the images are not loading.
Help.
Sorry for my English
K2 many unnecessary loads on the server image (original image folder ./media/k2/items/srk/ and 6 images in folder / media / k2 / items / cashe /)
How to remove the original boot image and some of the other?
I just need L, S, XL.
Before commenting on the older versions of the original image commented in line /administrator/components/com_k2/models/item.php
// $ handle-> Process ($ savepath);
On K2.7 this does not happen, if the comment on the line, the images are not loading.
Help.
Sorry for my English
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 10 months ago #156020
by Krikor Boghossian
Replied by Krikor Boghossian on topic How to remove the extra load in K2.7 image?
Hello,
This is not recommended since it will lead into unexpected result.
Will stop a certain image size from being generated. You can try commenting out the entire process for an image size.
This is not recommended since it will lead into unexpected result.
$handle->Process($savepath)
Please Log in or Create an account to join the conversation.
- Мурат
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 4
8 years 10 months ago #156024
by Мурат
Replied by Мурат on topic How to remove the extra load in K2.7 image?
It does not help, maybe I'm doing wrong? Here's how I commented out:
/administrator/components/com_k2/models/item.php
/administrator/components/com_k2/models/item.php
//Original image
/*$savepath = JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'src';
$handle->image_convert = 'jpg';
$handle->jpeg_quality = 100;
$handle->file_auto_rename = false;
$handle->file_overwrite = true;
$handle->file_new_name_body = md5("Image".$row->id);
$handle->Process($savepath);*/
Please Log in or Create an account to join the conversation.
- Мурат
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 4
8 years 10 months ago #156025
by Мурат
Replied by Мурат on topic How to remove the extra load in K2.7 image?
Please Log in or Create an account to join the conversation.
- Мурат
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 4
8 years 10 months ago #156028
by Мурат
Replied by Мурат on topic How to remove the extra load in K2.7 image?
Attention developers probably have to make in the next update feature in the settings, to disable a certain size
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 10 months ago #156029
by Krikor Boghossian
Replied by Krikor Boghossian on topic How to remove the extra load in K2.7 image?
Take a look at this block of code.
This generates the XL image, you can comment out the sizes you do not want.
//XLarge image
$handle->image_resize = true;
$handle->image_ratio_y = true;
$handle->image_convert = 'jpg';
$handle->jpeg_quality = $params->get('imagesQuality');
$handle->file_auto_rename = false;
$handle->file_overwrite = true;
$handle->file_new_name_body = $filename.'_XL';
if (JRequest::getInt('itemImageXL'))
{
$imageWidth = JRequest::getInt('itemImageXL');
}
else
{
$imageWidth = $params->get('itemImageXL', '800');
}
$handle->image_x = $imageWidth;
$handle->Process($savepath);
This generates the XL image, you can comment out the sizes you do not want.
Please Log in or Create an account to join the conversation.