- This topic has 14 replies, 3 voices, and was last updated 6 years, 4 months ago by Martin.
November 20, 2014 at 8:59 am #47748Teut0
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?
CheersNovember 20, 2014 at 3:11 pm #47800TomLead DeveloperLead Developer
Wow – 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
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 #47806TomLead DeveloperLead DeveloperNovember 21, 2014 at 1:31 pm #47922TomLead DeveloperLead Developer
After 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 #48129TomLead DeveloperLead Developer
Interesting – 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 #48280TomLead DeveloperLead Developer
Do 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
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 #48318TomLead DeveloperLead DeveloperJanuary 2, 2015 at 3:27 am #60775Martin
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 the
width="1"attributes of the
Example for IE10 and hard crop disabled: http://historischedampftechnik.de/
CheersJanuary 2, 2015 at 5:26 am #60802Martin
Found a solution:
BFI Thumb changes the extension to
After removing line 216 from
gp-premium/addons/generate-page-header/inc/functions.phpand changing line 218 to
'quality' => 95,with hard crop enabled I get
jpgagain and the filesize is also smaller. Maybe you can add the params of BFI Thumb to the configuration of Page Header?
CheersJanuary 2, 2015 at 10:08 am #60902TomLead DeveloperLead DeveloperJanuary 3, 2015 at 10:18 am #61210TomLead DeveloperLead DeveloperJanuary 4, 2015 at 6:22 am #61418Martin
- You must be logged in to reply to this topic.