mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
99da221034
There are some hard limits in browser Canvas implementations, that will throw a runtime exception when crossed. Since those limits are platform dependent, the best we can do is catch it and back off from trying to optimize a problematic file. For example, a 60MB PNG can be processed fine by Chrome but Firefox will fail trying to extract the ImageData from the CanvasRenderingContext2D with NS_ERROR_FAILURE. Also cleans up the media-optimization-utils and add post-resize size logs |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |