I am importing more than 10000 products to my Magento 2 store and got the following error codes:

  1. Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 2

I knew I can fix this problem by uploading the missed images or delete the row(s), but it's very time-consuming.

Is there any way to skip the invalid images and continue the importing procession since I don't mind that a few products missing some additional images?


  • can you increase the max execution time for the timebeing.
    – inrsaurabh
    Apr 10, 2018 at 4:00
  • @inrsaurabh It seems not working.
    – AdamW
    Apr 10, 2018 at 8:21

1 Answer 1


The below method worked for me. I was uploading images from an external server and there were some images that were not uploaded(404) so while upload Magento was throwing the exception(not skipping), so I applied this solution.

Please do not try to override vendor files using a preference or plugin.

You can try with below method. For Magento 2.4.X version

File Path:- vendor/magento/module-catalog-import-export/Model/Import/Product.php

update function getFileHash with below code:-

private function getFileHash(string $path): string
    try {
        return hash_file(self::HASH_ALGORITHM, $path);
    catch(\Exception $e){
        return "";

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.