Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
How can I use external product images.  Heres my idea. 
 
digitalcomputernetwork
Jr. Member
 
Total Posts:  11
Joined:  2009-05-29
 

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.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sonassi Hosting & Design
Sr. Member
 
Avatar
Total Posts:  205
Joined:  2009-05-20
Manchester, UK
 

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) && (!== 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 :(

 Signature 

Sonassi UK Magento Experts
If you’re looking for fast UK Magento hosting, contact us!

MANCHESTER MAGENTO DESIGN | MAGENTO MANCHESTER DEVELOPMENT | UK MAGENTO HOSTING

Find the fastest Magento hosts with MageBenchmark

 
Magento Community Magento Community
Magento Community
Magento Community
 
AllTech Software
Member
 
Total Posts:  62
Joined:  2009-05-01
 

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.

Thanks

James

 
Magento Community Magento Community
Magento Community
Magento Community
 
Haosame
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2010-01-20
 

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.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sonassi Hosting & Design
Sr. Member
 
Avatar
Total Posts:  205
Joined:  2009-05-20
Manchester, UK
 
Haosame - 26 January 2010 05:00 AM

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.

 Signature 

Sonassi UK Magento Experts
If you’re looking for fast UK Magento hosting, contact us!

MANCHESTER MAGENTO DESIGN | MAGENTO MANCHESTER DEVELOPMENT | UK MAGENTO HOSTING

Find the fastest Magento hosts with MageBenchmark

 
Magento Community Magento Community
Magento Community
Magento Community
 
jackiellowery
Member
 
Avatar
Total Posts:  67
Joined:  2010-01-23
 

Here is what i did.  You can specify the url for each image for each product.  My supplier already has the links in my product feed.

http://www.magentocommerce.com/boards/viewthread/6947/P30/#t211403

 Signature 

Magento 1.5.1
Magento Extensions, Support, etc.

 
Magento Community Magento Community
Magento Community
Magento Community
 
devopensource
Member
 
Avatar
Total Posts:  38
Joined:  2008-04-23
spain
 

this work fine :D

(string)Mage::helper('catalog/image')->init($product'image')->resize(250);

 
Magento Community Magento Community
Magento Community
Magento Community
 
jackiellowery
Member
 
Avatar
Total Posts:  67
Joined:  2010-01-23
 
digitalcomputernetwork - 22 January 2010 02:04 PM

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.

This extension works great for me. Cheap too.

External Images 1.5.0.1 by Toybanana Software

 Signature 

Magento 1.5.1
Magento Extensions, Support, etc.

 
Magento Community Magento Community
Magento Community
Magento Community
 
VanGilsWeb
Sr. Member
 
Total Posts:  77
Joined:  2010-03-26
 
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) && (!== 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?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|761 users currently online|497070 forum posts