Open ErikBjare opened 4 years ago
I managed to work around the issue by reducing my pngs to 8-bit color and running optipng on them, to get the size down.
Still weird that it happens, looked through the code of jekyll-bliss don't understand what could possibly cause it.
It's been a while since I messed with the code, but we can probably start with this line:
See if you can reproduce this issue by creating a Node script and running:
var fs = require('fs')
fs.createReadStream( your_png_filename ).pipe(fs.createWriteStream( your_output_png_location_filename ))
I found that line but it looked really innocent to me. Especially since it copies the image to the build folder (I think), where the image is intact. The file doesn't get truncated until it's moved to the _site
folder.
I ran the snippet, and it works fine.
I have a largeish image (a screenshot) that jekyll-bliss somehow fails to copy correctly into the _site directory.
It even causes
feh
to refuse to open the file at all:Edit: I notice now that this happens for all png files (probably not just png's) larger than 128K, which then get truncated to 128K.
If I
cd _build && bundle exec jekyll build
the file builds correctly (into_site/_build
).The source image:
The resulting image (yes, half the image is missing):