Thanks @julian! The code is a bit daunting and I don't want to risk breaking anything at the moment. Is there any other way for me to change the og:image meta property? I tried adjusting my logo size but, that just made my logo smaller because of NodeBB's resizing in the header.
Resized images are sometimes larger than before
TLINDEN last edited by TLINDEN
While my users are uploading images all day long, my disk space goes down pretty fast and I wanted to see why. One thing I found is that NodeBB seems to resize every uploaded image, I suspect to have it better fit the page.
However, this sometimes leads to larger files than the uploaded ones. Here are a couple of examples:
-rw-r--r-- 1 curv curv 207941 Mar 18 18:41 1521394868838-teig-formen1.jpg -rw-r--r-- 1 curv curv 439097 Mar 18 18:41 1521394868838-teig-formen1-resized.jpg
This is an increase by 50%. But this one is even worse:
-rw-r--r-- 1 curv curv 71110 Mar 18 15:55 1521384951269-fb_img_1520771555885.jpg -rw-r--r-- 1 curv curv 440592 Mar 18 15:55 1521384951269-fb_img_1520771555885-resized.jpg
The resized image is 6 times larger!
I'd consider this a bug, since IF NodeBB wants to resize an image, the result should be smaller in any case. Especially if downsizing from 1048px width to 760px width like the first example. The second image is a comic image containing only 8 colors.
It would be better if it wouldn't resize such small images at all.
It seems to me that resized images are uncompressed which is why they are larger.
Can you file this as an issue on our github page, in the meantime you can disable the resizing of images to 760 by setting the setting to 0 in the ACP.
This is fixed https://github.com/NodeBB/NodeBB/issues/6373, will be available in 1.8.1
TLINDEN last edited by
Now, that was fast. Wow!
Thanks a lot,