News for hackers. Stuff that matters.
Re:Show HN: I Built ImgFiber-Better Image Optimizer. Free No... by iambavith on Sunday April 06, 2025 @07:31AM (#43600658)
I built the image compression for imgfiber using CompressorJS as the base. It’s a reliable library by Feng Yuanchen (https://fengyuanchen.github.io/compressorjs/), originally designed for lossy compression. I wrapped and modified it to meet our specific needs, tweaking the code so the results differ from the default - you won’t get the same file size or optimization when using it out of the box. Full credit for the core library goes to the original author; my work was to modify it for our usecase. to solve our own personal pain point.
Re:Show HN: I Built ImgFiber-Better Image Optimizer. Free No... by bertman on Sunday April 06, 2025 @08:02AM (#43600814)
Using CompressorJS means lossy image compression. You really shouldn't be calling this "Instant, Lossless File Compression" on your page.

Also, because you're using ConvertJS's default settings, you should know that PNG files > 5 MB are converted to JPG (https://github.com/fengyuanchen/compressorjs?tab=readme-ov-f...). Your site, however, keeps the .png file name ending for the converted image, again falsely suggesting lossless compression.

Re:Show HN: I Built ImgFiber-Better Image Optimizer. Free No... by mootothemax on Sunday April 06, 2025 @08:55AM (#43601111)
> I wrapped and modified it to meet our specific needs, tweaking the code so the results differ from the default - you won’t get the same file size or optimization when using it out of the box.

I presume this is an oversight; changing CompressorJS's quality setting from its default of 0.8 to 0.75 results in the exact same output as ImgFiber.

Full settings dump:

  {
    "strict": true,
    "checkOrientation": true,
    "retainExif": false,
    "maxWidth": null,
    "maxHeight": null,
    "minWidth": 0,
    "minHeight": 0,
    "resize": "none",
    "quality": 0.75,
    "mimeType": "auto",
    "convertTypes": [
        "image/png"
    ],
    "convertSize": 5000000,
    "beforeDraw": null,
    "drew": null
}
Re:Show HN: I Built ImgFiber-Better Image Optimizer. Free No... by iambavith on Sunday April 06, 2025 @11:03PM (#43607197)
the settings dump you dropped will not deliver on same outputs :)