Author Topic: optimizing graphics seem to be overridden somehow  (Read 5147 times)

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
optimizing graphics seem to be overridden somehow
« on: May 05, 2015, 05:49:27 PM »
I am working in a new clean install of 1.2.1.

It seems there is something that is overriding my image file sizes.  I have optimized my images to increase my page load speeds,  but something seems to be re-doing them.

Here's an example,  I uploaded a product image of 300 x 300 optimized to 25.7KB,   but when I check image sizes on the home page it comes up at 250 x 250 for 244.84  KB  and all the images on the home page regardless of what I have for the upload to the resource library seem to use that size.  If i check the resource library  it is 100 x 100 for 39.28 KB

What is re-sizing the uploads?  I have not encountered this with previous versions so am "concerned" with the 1.2.1 as it is negatively impacting my page load speeds.

After doing a little more testing  I am only having the issue with .png images,   jpg is working correctly.  So now I am more confused!  Should we not be using png?


thanks.
Lee
« Last Edit: May 05, 2015, 06:16:30 PM by llegrand »

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: optimizing graphics seem to be overridden somehow
« Reply #1 on: May 05, 2015, 07:19:53 PM »
no. Abantecart resize images by request. On storefront you see thumbnails. You original png saves as-is. You can check it size in Resource Library on admin-side, just click "preview".
i guess issue is in core/lib/image.php.
Can you post url of your png?
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: optimizing graphics seem to be overridden somehow
« Reply #2 on: May 05, 2015, 09:09:34 PM »
Okay,  here's a clean test for you  -  http://wehearyou2.com/test121/

Look in the latest products

blue image png  uploaded 500 x 500 77 KB  in resources  shows 100 x 100 thumbnail  39.28 KB  Home page 250 x 250 244.84 KB

red image jpg uploaded  500 X 500 57.5 KMB in resources  shows 100 x 100 thumbnail  13.07 KB  Home page 250 x 250 55.5 KB


this is just something I don't understand. 

Lee

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: optimizing graphics seem to be overridden somehow
« Reply #3 on: May 06, 2015, 11:37:25 AM »
core/lib/image.php

Please check attached file
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: optimizing graphics seem to be overridden somehow
« Reply #4 on: May 06, 2015, 12:03:35 PM »
I have checked that file against the one in the installed cart (a virgin install with nothing changed in the files)using a compare tool.

They are identical.   So what's next?

By the way I tested this on the demo installed also,  and it has the same result.



Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: optimizing graphics seem to be overridden somehow
« Reply #5 on: May 06, 2015, 12:11:55 PM »
i added optimizing process for png into image.php .
To test you need:
- replace core/lib/image.php
- clear thumbnails via admin->system->cache->clear images
- open storefront ( your thumbnails will be recreated)
- check size
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: optimizing graphics seem to be overridden somehow
« Reply #6 on: May 06, 2015, 12:56:26 PM »
okay,  have done all that -  actually did it three times to be really sure I used the correct file

I am getting the same size on the home page -  I have added one more - the Abantecart Logo,  and it behaves the same.
It seems is does not matter what size the image is,  the 250 x 250 goes to the same size on png files.  244.84

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod