Destroy the original image when done with resizing

When re-sizing a bunch of 24 megapixels image (direct from a digital camera) into responsive images, not destroying the `img` member made my server OOM (it does not have a lot of RAM, it's a cheap VPS).

Additionally, when re-generating the site, although there was no need to re-generate the images, it looked like it was still loading them up, and the GC was not kicking in so it was OOM-ing (or close to OOM-ing) as well.

This fixes both issues.
This commit is contained in:
Paul Adenot 2016-03-16 18:35:34 +01:00
parent 936dfc2abe
commit a9cf918103
1 changed files with 2 additions and 0 deletions

View File

@ -36,6 +36,8 @@ module Jekyll
i.destroy!
end
img.destroy!
resized
end