Wordpress https images only get 500 internal server error


Staff member
I'm trying to publish a new wordpress website on https. The site works except the images don't load. (the site and the media library) I used WP Migrate plugin to migrate the database. All images have https and if I open only the image I get 500 Internal server error (http and https). I tried uploading a new image and the problem is the same. I keep googling on the problem but I haven't found the solution nor the explanation on why images from upload folder served over https are blocked. The logo from theme/images folder loads ok.
Is there something I need to add to htaccess or something in wp-config so the images from upload folder will load?