I want to know how to use external hosted product images. I have about 2000 items to import. The perfect solutions would allow me to import the category, product, and use external images. Im thinking that it might be possible to add a field to the import process that stores the image url in the database. Then I would go change all the codes that referenced the old image-file structure. I would try to make it similar to the way that the product name or category is stored and referenced.
I cant do this myself but it sounds like it would work. I hope someone smarts finds this post.
I’ve been thinking about this - you wouldn’t really be able to, nor can I really imagine wanting to.
All the images are cached at different sizes (on demand) then saved. If the source was external, not only would it add overhead to connect, download, resize, save and deliver - but ultimately, the next time round, Magento would have cached it locally anyway!
Another option is to disable image caching, but that will add a massive overhead to the server as it will have to resize images on the fly.
The last is to perhaps NFS mount the ./media directory of the remote server locally, then change the image source in setBaseFile() in app/code/core/Mage/Catalog/Model/Product/Image.php
public function setBaseFile($file) { if (($file) && (0 !== strpos($file, '/', 0))) { $file = '/' . $file; } # $baseDir = Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath(); $baseDir = "http://NEWURL/media/catalog/product";
Then it would store the cache remotely and load the file remotely, seems a bit of a waste of time to me though :(
Do you have a list of these images and locations? I’m guessing so. In such a case use an off-line downloader to grab them all, then you can upload them to your site. Simples!
If you need help importing, or want someone to do it for you, contact me.
Please, help me. This is work whis one external server. But I have a several servers. Example: http://www.server1.com/image, http://www.server2.com/products/image/large… How to make sure that the database could make a picture url. I don’t use Import/Export .csv file, because I work directly with the base.
Please, help me. This is work whis one external server. But I have a several servers. Example: http://www.server1.com/image, http://www.server2.com/products/image/large… How to make sure that the database could make a picture url. I don’t use Import/Export .csv file, because I work directly with the base.
Use round-robin DNS and share a common domain name - or set-up a load balancer between the other two domains.
I can’t see how you are maxing out traffic for static content - whilst still being able to sustain PHP requests at that rate.
I want to know how to use external hosted product images. I have about 2000 items to import. The perfect solutions would allow me to import the category, product, and use external images. Im thinking that it might be possible to add a field to the import process that stores the image url in the database. Then I would go change all the codes that referenced the old image-file structure. I would try to make it similar to the way that the product name or category is stored and referenced.
I cant do this myself but it sounds like it would work. I hope someone smarts finds this post.
Sonassi Hosting & Design - 22 January 2010 02:11 PM
I’ve been thinking about this - you wouldn’t really be able to, nor can I really imagine wanting to.
All the images are cached at different sizes (on demand) then saved. If the source was external, not only would it add overhead to connect, download, resize, save and deliver - but ultimately, the next time round, Magento would have cached it locally anyway!
Another option is to disable image caching, but that will add a massive overhead to the server as it will have to resize images on the fly.
The last is to perhaps NFS mount the ./media directory of the remote server locally, then change the image source in setBaseFile() in app/code/core/Mage/Catalog/Model/Product/Image.php
public function setBaseFile($file) { if (($file) && (0 !== strpos($file, '/', 0))) { $file = '/' . $file; } # $baseDir = Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath(); $baseDir = "http://NEWURL/media/catalog/product";
Then it would store the cache remotely and load the file remotely, seems a bit of a waste of time to me though :(
Would it be possible to edit this function in a similar way to display a remote image from a full url path, that is being saved in an attribute?