Keyword

K2 removing compression on uploaded images

  • PhoenixOmega
  • PhoenixOmega's Avatar Topic Author
  • Offline
  • New Member
More
10 years 1 week ago - 10 years 1 week ago #142560 by PhoenixOmega
K2 removing compression on uploaded images was created by PhoenixOmega
Hello,

I am trying to increase my site's Google Pagespeed Insights score. One of the major gripes it's telling me is that the images that K2 is generating are not losslessly compressed. Here's an exact quote from it:

Losslessly compressing /…e/4786bdc09cc2bea7a6f114db8b9ef4d3_L.jpg could save 26.8KiB (28% reduction).


developers.google.com/speed/pagespeed/insights/

Image optimization is currently a "red" area, which means Google is severely penalizing my score because K2 isn't compressing the images like Google wants.

Now I am using my own tools to compress the original image to 75 kb, but after uploading to K2, the image grows to 127 kb, nearly twice the size of the image that I uploaded, even though it's the same size in pixel dimensions. Attached is the original image that I compressed, and then after that is the image that K2 generated, which as you can see is basically twice the size, which is not good for performance!

http://imgur.com/XljmYzR

http://imgur.com/dcxICBQ

Is there any way to upload an image and prevent K2 from stripping the compression I did?
Last edit: 10 years 1 week ago by PhoenixOmega.
The topic has been locked.
More
10 years 1 week ago #142562 by Joe Campbell
Replied by Joe Campbell on topic K2 removing compression on uploaded images
Hi,

All images uploaded through K2 (other than the via the K2 Media Manager) is processed resulting in a change in:

- file name
- file size
- compression
- possibly dimensions (depending on what options you select)

To avoid this you can use image type extra fields. Please view my previous post that further explains:
www.joomlaworks.net/forum/k2-en/40376-solved-keeping-orginal-names-in-my-images#141480

You also may want to investigate the following online image compression tools:
compressor.io/
kraken.io/

I hope this helps,

Joe Campbell
The topic has been locked.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 1 week ago #142583 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 removing compression on uploaded images
K2 users PHP's GD Library to compress images. Same as WP and other CMS's.

As for not losslessly compressed, this is not possible since .jpg is not a lossless format.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
  • PhoenixOmega
  • PhoenixOmega's Avatar Topic Author
  • Offline
  • New Member
More
10 years 3 days ago #142784 by PhoenixOmega
Replied by PhoenixOmega on topic K2 removing compression on uploaded images
Thank you! This was extremely helpful.
The topic has been locked.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 3 days ago #142795 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 removing compression on uploaded images
You 're welcome.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
More
9 years 11 months ago #142973 by Joe Campbell
The topic has been locked.
More
7 years 6 months ago #163918 by quebecguitare
Replied by quebecguitare on topic K2 removing compression on uploaded images
Hi,

I'm also trying to improve my Google PageSpeed Insights Scoring.

Is it a google idea to find those pictures in the cache take the newly compressed pictures provided by Google Google PageSpeed Insights Scoring and crush the old one?

Any better advice?

If this is a good idea, I can't seems to find these pictures in the /media/k2/items/cache folder.
They are either named differently or I don't have the right path.

Thanks
Possible Optimizations
Optimize images
Properly formatting and compressing images can save many bytes of data.
Optimize the following images to reduce their size by 446.6KiB (61% reduction).
Compressing https://www.quebecguitare.ca/…8f15ce4fdbadcc79dc8ea_Lnsp-715_links.jpg could save 37.2KiB (74% reduction).
Compressing https://www.quebecguitare.ca/…8edaca099dba64773f3f2_Lnsp-715_links.jpg could save 36.4KiB (69% reduction).
Compressing https://www.quebecguitare.ca/…6d2d63784c37b0d4354d9_Lnsp-715_links.jpg could save 36.3KiB (71% reduction).
Compressing https://www.quebecguitare.ca/…2bc303a0ab3ae5d25b105_Lnsp-715_links.jpg could save 36.1KiB (70% reduction).
Compressing https://www.quebecguitare.ca/…6564a2ea064ec2afe25d4_Lnsp-715_links.jpg could save 35.2KiB (72% reduction).
Compressing https://www.quebecguitare.ca/…98ff1d00d15e09c24406a_Lnsp-715_links.jpg could save 34.7KiB (71% reduction).
Compressing https://www.quebecguitare.ca/…4ddfe6105cdd213adfa9d_Lnsp-715_links.jpg could save 34.7KiB (71% reduction).
Compressing https://www.quebecguitare.ca/…d9d96fd7fea653ac618e5_Lnsp-715_links.jpg could save 34.3KiB (71% reduction).
Compressing https://www.quebecguitare.ca/…e1847584fd382f605b0a6_Lnsp-715_links.jpg could save 33.9KiB (70% reduction).
Compressing https://www.quebecguitare.ca/…29c304dabcd194521e2e1_Lnsp-715_links.jpg could save 33.6KiB (68% reduction).
Compressing https://www.quebecguitare.ca/…8507e9e38413a7691e181_Lnsp-715_links.jpg could save 32.3KiB (71% reduction).
Compressing https://www.quebecguitare.ca/…8f0b9f03ec1adbe79e026_Lnsp-715_links.jpg could save 26.9KiB (70% reduction).
Compressing https://www.quebecguitare.ca/images/guitar-girl_menu.jpg could save 10.1KiB (47% reduction).
Compressing https://www.quebecguitare.ca/images/demo/team_2.jpg could save 3.5KiB (19% reduction).
Compressing https://www.quebecguitare.ca/images/demo/team_4.jpg could save 3.3KiB (19% reduction).
Compressing https://www.quebecguitare.ca/images/demo/team_1.jpg could save 3KiB (20% reduction).
Compressing https://www.quebecguitare.ca/images/demo/memory_icon_v4.png could save 2.5KiB (26% reduction).
Compressing https://www.quebecguitare.ca/images/demo/coordination_icon_v4.png could save 2.4KiB (31% reduction).
Compressing https://www.quebecguitare.ca/…images/demo/cultural_history_icon_v4.png could save 2.2KiB (28% reduction).
Compressing https://www.quebecguitare.ca/images/demo/stress_icon_v4.png could save 2KiB (22% reduction).
Compressing https://www.quebecguitare.ca/images/demo/team_3.jpg could save 2KiB (12% reduction).
Compressing https://www.quebecguitare.ca/images/icons/icon-blue-guitar.png could save 1.5KiB (33% reduction).
Compressing https://www.quebecguitare.ca/…2f80dc2215f346ba9ce28_Genericnsp-712.jpg could save 681B (12% reduction).
Compressing https://www.quebecguitare.ca/…57cf6d57c8926869c1003_Genericnsp-712.jpg could save 655B (13% reduction).
Compressing https://www.quebecguitare.ca/…822180ac867ab6712269d_Genericnsp-712.jpg could save 630B (11% reduction).
Compressing https://www.quebecguitare.ca/…04828d9f9f9abb89cb004_Genericnsp-712.jpg could save 626B (11% reduction).

Thank you for your time!
The topic has been locked.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 6 months ago #163922 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 removing compression on uploaded images
Hello,

In order to have better compression you need another library apart from PHP's GD library.
This can't be done server-wise since K2 only supports GD.

You can look at libjpeg or pngcrush but these are cli tools mostly.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
More
7 years 6 months ago #163926 by quebecguitare
Replied by quebecguitare on topic K2 removing compression on uploaded images
Is it possible to only replace the cache files like I suggested, since most of the content is static anyway?

Thank you for your time!
The topic has been locked.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 6 months ago #163930 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 removing compression on uploaded images
You can download them use an app for image compression like ImageOptim and reupload them

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
More
7 years 6 months ago #163931 by quebecguitare
Replied by quebecguitare on topic K2 removing compression on uploaded images
Do I re upload them in the cache directory?

Could you confirm the path according to what has been crawled in the Google PageSpeed Insights reference I pasted in my first post?

Thank you for your time!
The topic has been locked.
More
7 years 6 months ago - 2 years 9 months ago #163932 by Joe Campbell
Replied by Joe Campbell on topic K2 removing compression on uploaded images
You can use the following Joomla! extension for automated image optimization:

www.imagerecycle.com/
Last edit: 2 years 9 months ago by JoomlaWorks.
The topic has been locked.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 6 months ago #163939 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 removing compression on uploaded images
Do you recommend it Joe?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
More
7 years 6 months ago #163943 by Joe Campbell
Replied by Joe Campbell on topic K2 removing compression on uploaded images
I have yet to use it as a plugin - I used the web app version - I even wrote an article about it:

www.cloudaccess.net/fresh/blog/entry/2017/03/24/top-3-online-image-optimizers.html
The topic has been locked.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 6 months ago #163960 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 removing compression on uploaded images
Kudos buddy :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
More
3 years 7 months ago #179405 by Ali
i see something i picture compress

after convert image with K2 image resolution change to 96

for normal image ( in monitor tv or any digital device ) must or better be 72
more than 72 = no different because monitors not support it

and this change need more size for example

with photoshop
image 600 * 900 with resolution 96 = 150k
image 600 * 900 with resolution 72 = 100k
compress for web 96 = 53k
compress for web 72 = 36k

now this is be nice if in K2 you change something after conver image resolution change to 72 or add some code like other pluging for optimize images then save
The topic has been locked.
More
3 years 7 months ago #179451 by JoomlaWorks
Replied by JoomlaWorks on topic K2 removing compression on uploaded images
There is a CLI script for that: github.com/getk2/rebuildK2imageCache

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.

Powered by Kunena Forum