Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized Image CDN #80

Open
abskrj opened this issue Jan 22, 2024 · 0 comments
Open

Optimized Image CDN #80

abskrj opened this issue Jan 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@abskrj
Copy link
Member

abskrj commented Jan 22, 2024

Describe the solution you'd like
Create an endpoint which takes a file path, width and height and returns a file in that dimension.
The URL should look like

/api/v1/image/path-to-file?h=100&w=100

Approach

  1. Take the file path, create the hash with height and width
  2. Check if the path (/path-to-file#hash) exists on CDN
  3. If it exists, do a 301 redirect
  4. If doesnt, generate the image file using ffmpeg and upload it to CDN, and return the file.
@abskrj abskrj added the enhancement New feature or request label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant