cancel
Showing results for 
Search instead for 
Did you mean: 

Problem uploading images to products

Problem uploading images to products

Hi,

 

I'm having problems to upload product images in Magento 2.2.

 

It displays a popup with a message "No se reconoce o no se admite este tipo de archivo de extensión." In english it means the file type isn't recognized.

 

The ajax response is: error The file was not uploaded, error code 666

 

 

I have checked the next things:

 

- The format file is not the problem. It is a simple jpg.

 

- The upload_tmp_dir folder have the correct permissions.

 

- The GD extension for php is installed.

 

- The image has 113KB, it isn't a problem of post_max_size.

 

What could it be the problem?

 

Thanks

15 REPLIES 15

Re: Problem uploading images to products

Hello @Multiplicalia 

 

Tried all the solutions mentioned here?

https://magento.stackexchange.com/questions/127586/magento-2-can-not-upload-product-images

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Problem uploading images to products

@Multiplicalia please try to clear once  /pub/media/tmp/ and try to upload again.

 

Hope it helps!

Thanks

Re: Problem uploading images to products

@Rahul Gupta I have removed the subfolders and files in /pub/media/tmp but the problem still exists.

 

@theMageComp I tried almost the points of that link but it didn't worked. I didn't try the point 5 about install ImageMagick as it doesn't seem mandatory. You can use ImageMagick or GD. In my case the server uses GD.

 

Re: Problem uploading images to products

Could someone help me to realize the origin of the problem?

 

Thanks in advance.

Re: Problem uploading images to products

@Multiplicalia please try to enable fileinfo extension for PHP.

 

Thanks

Re: Problem uploading images to products

Thanks @Rahul Gupta  but that extension is already installed:

 

fileinfo support => enabled
version => 1.0.5
libmagic => 517

Re: Problem uploading images to products

@Multiplicalia 

Check phpinfo() page, if file_uploads is off, set file_uploads on

 

Thanks

Re: Problem uploading images to products

fileuploads.png

Thanks @Rahul Gupta   but file_uploads is already active.

Re: Problem uploading images to products

@Multiplicalia do one thing instead of changing the image for existing product, try to create a new simple product and upload image there and check if you are getting the same error.

 

Thanks