Keyword

How to remove the extra load in K2.7 image?

  • Мурат
  • Мурат's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 months ago #156000 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.php
// $ handle-> Process ($ savepath);
and 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

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 9 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.
$handle->Process($savepath)
Will stop a certain image size from being generated. You can try commenting out the entire process for an image size.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Мурат
  • Мурат's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 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
//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.

  • Мурат
  • Мурат's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 months ago #156025 by Мурат
Replied by Мурат on topic How to remove the extra load in K2.7 image?
Here is my file
/administrator/components/com_k2/models/item.php
yadi.sk/d/rdX4NjJJsstc7

Please Log in or Create an account to join the conversation.

  • Мурат
  • Мурат's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 9 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.
				//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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum