When performing setup:upgrade, it returns Media files stored outside the "Allowed Media Gallery" folders will not be available for the media gallery. Please refer to the developer's guide for more details. and when I want to upload an image for a product, the error appears "Something went wrong when saving the file(s). ` please help me, I don't understand why the media didn't work

1 Answer 1


i found solutions for the upload image error, but still i need to know how add Media files to"Allowed Media Gallery" if any solution ? Thanks bellow the solution upload file error

in the path veondor/magento/framework/Image/Adapter in Gd2.php find function validateURLScheme and replace

if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes)) {


if ($url && isset($url['scheme']) && strlen($url['scheme']) > 1 && !in_array($url['scheme'], $allowed_schemes)) {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.