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

Media endpoint: Support modifying images prior to uploading #394

Closed
aciccarello opened this issue Dec 31, 2021 · 2 comments · Fixed by #700
Closed

Media endpoint: Support modifying images prior to uploading #394

aciccarello opened this issue Dec 31, 2021 · 2 comments · Fixed by #700
Labels
enhancement New feature or request plugin-endpoint Endpoint plug-in
Milestone

Comments

@aciccarello
Copy link

Is your feature request related to a problem? Please describe.
I want to be able to quickly upload photos to my media endpoint but I want to do some normalization before they are saved to my public git repo. For example I want my images not to include location data and to be somewhat compressed.

Describe the solution you’d like
I would like to see a config option to register a middleware function that is able to modify files before they are uploaded to the store.

Describe alternatives you’ve considered
I currently do image normalization manually using squoosh.app. I looked at the endpoint-media package and didn't see any relevant configuration options.

@aciccarello aciccarello added the enhancement New feature or request label Dec 31, 2021
@paulrobertlloyd paulrobertlloyd changed the title Addind middleware to image uploading Add middleware for image uploading Feb 3, 2022
@paulrobertlloyd paulrobertlloyd added this to the v1.0.0 milestone May 25, 2022
@paulrobertlloyd paulrobertlloyd mentioned this issue May 25, 2022
26 tasks
@paulrobertlloyd paulrobertlloyd added the plugin-endpoint Endpoint plug-in label Jun 5, 2022
@paulrobertlloyd paulrobertlloyd modified the milestones: v1.0.0, Later Nov 6, 2022
@paulrobertlloyd paulrobertlloyd changed the title Add middleware for image uploading Media endpoint: Support modifying images prior to uploading Dec 15, 2022
@paulrobertlloyd
Copy link
Collaborator

@aciccarello Take a look at #700. As it stands, the implementation allows you provide options per post type under the media option and apply Sharp resize options before uploading.

@aciccarello
Copy link
Author

Nice, I took a quick look and that seems simple enough. I'll have to play around with the sharp options and see how they turn out. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin-endpoint Endpoint plug-in
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants