Keyword

Why is K2 Large image much larger then original?

  • MdeBoer
  • MdeBoer's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 month ago #117492 by MdeBoer
When optimising my web site for speed I noticed that the K2 images are much larger then I have original uploaded into K2.

I saved with PhotoShop (option Save for web) a jpg image with size 570px. The same size as set in the General K2 settings for a Large image. The result was a 30Kb image.
When uploading this image into K2 (under tab image at K2 item), the image stored in the src folder (/media/k2/items/src) has now a size of 310Kb. The cache folder which contains the pre-formatted images (/media/k2/items/cache), a Large image is generated with a size of 100Kb (~3x larger).

I have tried different images with different px/dpi but this seems to make no difference to reduce the size of the Large image. Is there any way to influence the size? What kind of algorithm for sizing images by K2?
Attachments:

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 1 month ago #117493 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Why is K2 Large image much larger then original?
Hello MdeBoer,

If you have set your large size to something like 1000px or more GD (The library which K2 uses ) will produce an image which is twice the size of the original image. This also means it will have a larger size.

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

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

  • MdeBoer
  • MdeBoer's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 month ago #117494 by MdeBoer
Thanks for your reply.

So to conclude uploading an image is scaled up to approx twice the size due to GD library. And there is no way to influence this without impacting the quality of the generated image.

Is it possible, as a workaround, to replace the generated Large image file in cache with a jpg of my own (of course with the same px size and file id)?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 1 month ago #117495 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Why is K2 Large image much larger then original?
You can set the large size at 570px the same as the original size which sounds more logical and experiment with image quality. A value of 75 - 80 will produce lighter images with minimal quality loss.

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