Learning MEAN and I’m trying to use an NPM project to pull the dominant color from an image, to create a complimentary color palette for certain UI elements based on a random image that loads as the background of a “hero” section. Working with a local development environment, images are on my computer, not a cloud system, but even with async/await, the route finishes and renders the page before the script can load the image and pull the color. Am I doing it out of order? Should I put that part in a middleware that runs before the route? Is there a way to make the image load faster/route run slower?
Submitted January 31, 2020 at 01:13PM by serialcompliment
No comments:
Post a Comment