- Posts: 5
COMMUNITY FORUM
K2 removing compression on uploaded images
- PhoenixOmega
- Topic Author
- Offline
- New Member
Less
More
9 years 7 months ago - 9 years 7 months 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:
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?
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: 9 years 7 months ago by PhoenixOmega.
The topic has been locked.
- Joe Campbell
- Offline
- Platinum Member
Less
More
- Posts: 438
9 years 7 months 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
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
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 7 months ago #142583
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
9 years 7 months 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
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 7 months ago #142795
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
- Joe Campbell
- Offline
- Platinum Member
Less
More
- Posts: 438
9 years 7 months ago #142973
by Joe Campbell
Replied by Joe Campbell on topic K2 removing compression on uploaded images
K2 Power Tip: Stop K2 from Processing Images - K2 Hack
www.joomlaworks.net/forum/k2-en/41036-k2-power-tip-stop-k2-from-processing-images-k2-hack#142970
www.joomlaworks.net/forum/k2-en/41036-k2-power-tip-stop-k2-from-processing-images-k2-hack#142970
The topic has been locked.
- quebecguitare
- Offline
- Senior Member
Less
More
- Posts: 72
7 years 2 months ago #163918
by quebecguitare
Thank you for your time!
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
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
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 2 months ago #163922
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
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.
- quebecguitare
- Offline
- Senior Member
Less
More
- Posts: 72
7 years 2 months ago #163926
by quebecguitare
Thank you for your time!
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
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 2 months ago #163930
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.