-
Notifications
You must be signed in to change notification settings - Fork 47
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
Image endpoint (resize, crop) #257
Comments
Polleps
added a commit
that referenced
this issue
Aug 7, 2024
3 tasks
Polleps
added a commit
that referenced
this issue
Aug 7, 2024
Polleps
added a commit
that referenced
this issue
Aug 7, 2024
Polleps
added a commit
that referenced
this issue
Aug 7, 2024
Polleps
added a commit
that referenced
this issue
Aug 7, 2024
Polleps
added a commit
that referenced
this issue
Aug 7, 2024
Polleps
added a commit
that referenced
this issue
Aug 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now that we have Files #107, users are likely to upload and use images. Very important here is the ability to resize (and often crop) images to keep websites performant.
Implementation
As an endpoint
I think a simple implementation is this is to have an endpoint that takes:
Add an Endpoint in the
server/plugins
directory.When the endpoint receives a request, it checks its store (either a Tree in sled or a folder on the filesystem) if the file (probably with some deterministic identifier, such as
{resource}-{width}-{height}.{extension}
) exists. If yes, it will be returned to the user. If not, it will be created and stored, and then returned to the user.As a dynamic Class plugin
upload
endpointImage
instead of aFile
Libraries
The text was updated successfully, but these errors were encountered: