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:
parent
a0166e8cbe
commit
89114ab2be
|
@ -36,6 +36,8 @@ module Jekyll
|
||||||
i.destroy!
|
i.destroy!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
img.destroy!
|
||||||
|
|
||||||
resized
|
resized
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue