Hey guys,
I’m having a problem with Media Library/Upload.
- I can’t upload images bigger than 1Mb (I want to put 5mb, but if it gets bigger, it’s okay)
- The quality gets worse when I upload a good image.
- It’s only accepting JPEG/PNG.
I already look at almost all of Strapi forum posts about media library and still didn’t find a solution for me.
When I am developing on localhost, I can upload an image bigger than 1Mb, but when It’s deployed, the server doesn’t accept anymore.
Maybe it’s something with the deploy? With docker or nginx?
My configs:
- My config/plugin.js
upload: {
provider: "aws-s3",
providerOptions: {
accessKeyId: env("AWS_ACCESS_KEY_ID"),
secretAccessKey: env("AWS_SECRET_ACCESS_KEY"),
region: env("AWS_S3_BUCKET_REGION"),
params: {
Bucket: env("AWS_S3_BUCKET_NAME"),
},
sizeLimit: 5000000,
},
breakpoints: {
xlarge: 1920,
large: 1000,
medium: 750,
small: 500,
xsmall: 64,
},
}
- My config/middleware.js
settings: {
parser: {
enabled: true,
multpart: true,
formidable: {
maxFileSize: 5 * 1024 * 1024, // multipart data, modify here limit of uploaded file size
},
},
}
- My .plataform/nginx/proxy.config:
client_max_body_size 100M;
** I actually do not understand about nginx or docker, this config was another guy who did it.
- Strapi is deployed in AWS Elastic Search
- Images are hosted in AWS S3