Fix webp issues with Dev deployments#14377
Fix webp issues with Dev deployments#14377paulOsinski wants to merge 2 commits intoDefectDojo:bugfixfrom
Conversation
|
Won't this make our images lower res? Maybe a happy medium, but just wanted to note a potential negative side effect. |
We could also change the process and handle conversion to webp as a one-time async process in it's own PR so it's not part of a normal build. Once they're converted, there's no reason not to just keep the webp in the repo going forward and loose the former png if webp ends up being a smaller but same resolution file. |
|
Ok, I'm going to drop the image resizing commit because I'm realizing a few of these images are quite blurry after the batch job was run. @mtesauro the only issue with converting to webp at the repo level is maintenance, because this webp conversion process generates many resolutions of the same file we could end up with a large amount of webps. Hugo serves a specific webp depending on the page resolution, to handle mobile, big screens, etc. Currently Hugo recreates all of these webps at build time, but we could adopt a caching approach so that we're not re-converting every time. I haven't seen any issues in Prod yet, though, I only get this OOM when I try to run the build process on my laptop. |
648a0ab to
9adcf8a
Compare
npm run devhas been causing issues specifically surrounding webp conversion, leading to OOM errors. This fix bypasses webp conversion for local Hugo builds of our docs and simply serves the PNG instead.I've also shrunk quite a few image files while testing - sort of irrelevant but I figure it makes our repo a bit slimmer ¯_(ツ)_/¯
I can drop that commit if it's not meaningful.