I have a node.js with express running on Heroku linked to a github repository, it is serving a website which also contains a "gallery" section. The pictures in the gallery are loaded in very high res by other non tech-savvy admins, to prevent huge data usage from mobile users.
I would like the express.js server to downscale and compress the images coming from a certain path when requested by a normal get request before sending them as reply. Could you help me understand how can i "intercept" those requests ? or at least route me in a certain direction ?
Sorry to ask it here and like this, but i tryed looking many wikis and some questions here on stackoverflow but none seems to talk about what i'm searching (at least from my understanding).
Thank you for your time!