Skip to content

Media Preprocessing #17469

Answered by Piedone
thatplatypus asked this question in Q&A
Discussion options

You must be logged in to vote

If your only issue is that the images being served on the frontend are too large, then you can use Media Profiles to automatically resize them (as well as change their file format). This only affects how the files are served; still, the original files are stored. This is what I'd recommend.

If you really want to resize images on upload, then you could hijack the file creation by implementing IMediaCreatingEventHandler.MediaCreatingAsync().

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by thatplatypus
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants