Extend media upload sizes during onChange hook #6427
Unanswered
tommyboylab
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to extend the created media sizes with an additional size I create using an alternative image processor during the onChange hook of the media upload process. My hope is that it will show in Admin UI and allow me to delete it along side other sizes when deleting the media.
I have it successfully producing the media and uploading it to the vercel blob storage I am using, but the ui is not recognizing the additional image-size object that is being added within data.sizes.
I am wondering the best way to extend the images-sizes during the image upload process.
My intention is to:
-> get image and send it to hook / gathered from payload upload in whatever hook would be best for this case
-> process using alternative pre-processor
-> send file to vercel blob
-> update data.sizes to include new size and its properties before returning it to be completed
-> have updated size object show within admin UI
-> upon deletion, also delete the generated image
Any help with this would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions