- This topic has 14 replies, 3 voices, and was last updated 8 years, 8 months ago by
Martin.
-
AuthorPosts
-
November 20, 2014 at 8:59 am #47748
Teut0
Hey there!
When i use an image as header it works well and has the size of the image uploaded.
But when i use the hard crop function it makes it like 10 times larger.
example: no hard crop: 64 kb .. using hard crop: 640 kb
Do you have any idea how to solve that problem?
Cheers
November 20, 2014 at 3:11 pm #47800Tom
Lead DeveloperLead DeveloperWow – not sure that’s even possible, if anything it should reduce the size considerably.
For example: http://i.imgur.com/zB9DBgb.jpg
Image on left hasn’t been hard-cropped, while the image on the right was hard cropped.
Do you have an example of this anywhere that I can see?
November 20, 2014 at 3:23 pm #47805Teut0
Hi!
When i dont use this function and click on the image it shows the image uploaded in the media-section.
But when it is hard cropped and i click on the image.. it adds http://xxx.xx/wp-content/uploads/bfi_thumb/ and some random numbers and suddenly it is like 10 times larger.
Also when i test it with google pagespeed it shows how large the image actually is and gives like 10 points less than without using the hard crop.
Shallshal i pm you my website?
November 20, 2014 at 3:35 pm #47806Tom
Lead DeveloperLead DeveloperHmm, sure – you can email it to me at support@generatepress.com.
You’re getting these results using the Page Header addon?
November 21, 2014 at 1:31 pm #47922Tom
Lead DeveloperLead DeveloperAfter taking a look at this, it seems to be happening when you set a hard crop to a larger image size than the original.
In your case, the original image 1024px wide, while your hard-crop is 1200px wide.
This will definitely add some size to the file, and the extra is probably coming from the fact that the resizer is built to re-size down, not up.
See if resizing the image down has the same effect π
November 21, 2014 at 4:54 pm #48069Teut0
That sounds logical, but resizing down has the same effect.
I uploaded an 1500 x 803 px large image (230 kb), resized it to 1300 x 700 px and suddenly it was over 1 mb large..
It seems like the bigger you make it, independent from the original size, the larger it will be.
Can you reconstruct this?
Thanks for your fast and good support!
November 21, 2014 at 11:57 pm #48129Tom
Lead DeveloperLead DeveloperInteresting – I can’t re-construct, but it might be a hosting thing?
The resizing script is BFI Thumb: https://github.com/bfintal/bfi_thumb
I’ll do some more digging around in the morning and see if I can find anyone else who’s experiencing this π
November 22, 2014 at 1:03 pm #48280Tom
Lead DeveloperLead DeveloperDo you have another server somewhere where you can test this? I’m curious to know if it’s a server thing, as I can’t reproduce, and it doesn’t seem like anyone else using this resizing script has encountered it.
November 22, 2014 at 2:58 pm #48316Teut0
Hey
I tested it ony my local system.
Just Generatepress and the plugin installed, under the same circumstances.
-> Same result.
Dont worry about it π I’ll find a workaround..
Thank you though!
November 22, 2014 at 3:12 pm #48318Tom
Lead DeveloperLead DeveloperHmm, I’ll do some more looking around too.
January 2, 2015 at 3:27 am #60775Martin
Hi,
I’m having the same problem as Teut0. My Page Header image will be converted to a .png which is 3x-4x bigger than the origin .jpg.
I could workaround this behaviour by disabling the hard crop but unfortunately then the image is not visible with Internet Explorer 10. Internet Explorer 11 works and also IE10 emulation in IE11 works. The problem seems to be theheight="1"
andwidth="1"
attributes of the<img>
tag
Example for IE10 and hard crop disabled: http://historischedampftechnik.de/Cheers
January 2, 2015 at 5:26 am #60802Martin
Found a solution:
BFI Thumb changes the extension to
png
ifopacity
is set:
https://github.com/bfintal/bfi_thumb/blob/master/BFI_Thumb.php#L620After removing line 216 from
gp-premium/addons/generate-page-header/inc/functions.php
and changing line 218 to'quality' => 95,
with hard crop enabled I getjpg
again and the filesize is also smaller. Maybe you can add the params of BFI Thumb to the configuration of Page Header?Cheers
January 2, 2015 at 10:08 am #60902Tom
Lead DeveloperLead DeveloperHi Martin,
Great find! I’ll make this adjustment today!
Thanks a lot π
January 3, 2015 at 10:18 am #61210Tom
Lead DeveloperLead DeveloperI’ve made this adjustment to the next version of GP Premium/Page Header.
Thanks again!
January 4, 2015 at 6:22 am #61418Martin
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.