3 ms·
We do something similar : when nginx doesn't find the file for a given format (width and height are in the url), it's a 404 and we use the 404 handler to proxy
by jarnix 11y ago
We do something similar : when nginx doesn't find the file for a given format (width and height are in the url), it's a 404 and we use the 404 handler to proxy to a php app that does the resize/crop (and we have a list of the formats we use more often in the app so we store the generated thumb on the disk), the resize/crop operation is centered around coordinates that we determine with opencv (it detects faces and/or focus points) when the user uploads the picture.
We use varnish in front of nginx