-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images imported via URL have crazy file paths #5306
Comments
Are we really the only users who find this approach for file-naming a bit... ridiculous? Surely it's not the intended functionality? |
@hgpit You're not the only one. It seems excessive. But it might be because you can run multiple stores/websites on the same magento setup. If you have any product crossover, there may need to be a way for magento to create a unique file name. |
@Ctucker9233 I'm not really sure what you mean, sorry. We do actually run multiple websites and stores. But as every product image is imported via a URL, they're all still filed under [magento]/pub/media/catalog/product/h/t/ regardless of the site/store because of their source path/URL. We've just invested in Unirgy's uRapidFlow product importer for EE v2.1, and that brings in images (via URLs) "properly", as-in my above expected result. So I still think M2's current folder creations method is wrong/broken. |
@hgpit Ok, I understand now. What I meant is that might be part of Magento's Core structure to create a unique filename for each instance of an image. So if you have the same image on two sites, Magento can tell the difference between the two instances of that image. I'm just speculating this might be the case for the weird file naming. |
@hgpit |
@andimov Also, how is "datastore.mydomain.local" a weird domain for importing? Aside from the fact I have blatantly replaced the domain name with a generic one for the purpose of example; we have an internal server which serves all our image data, so for instance if we have a corporate product SKU of 12345 we can point any browser/system on our network to http://datastore.mydomain.local/imageserver/12345.jpg and it will return the image. There is nothing weird about it. |
@hgpit |
@andimov |
Hi @hgpit Thank you for reporting. |
Hi there. |
We ran into the same issue. The Magento import should definitely not include the path of the external URL in the filename. Bad for SEO beside other reasons. |
I can confirm this, having the same issue in version 2.1.8
|
@hgpit, thank you for your report. |
This issue was moved to magento-engcom/import-export-improvements#57 |
Should be fixed. If accepted I'll create backport to 2.2 & 2.1. |
Hi @hgpit. Thank you for your report. The fix will be available with the upcoming patch release. |
Steps to reproduce
Expected result
Actual result
When importing hundreds of thousands of products/images you end up with literally hundreds of thousands of files just under one folder: [magento]/pub/media/catalog/product/h/t/. So the file distribution logic of directory hierarchy creation based on the first two characters of the filename is futile/wasted - as the files will always be stored under /h/t/.
We are concerned that this could lead to speed issues accessing the /h/t/ folder. Certainly FTPing to the folder from a remote system could cause the FTP clients to hang (or stall for a long period).
Thank you
The text was updated successfully, but these errors were encountered: