Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 5
Using Remote Image URLs
 
JayKay8875
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2008-04-22
LA
 

Ok I followed the steps but I still have no images, just red crosses

if I go to the properties of the red cross it shows the correct url but it is followed by: �%20alt=

Image url: http://www.website.com/images/dh/t_DH000421.jpg�%20alt=

I think it has something to do with the “alt” part of the code I inserted right?

<img src="<?php echo $_product->getData('remote_image_url'); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />

Can you offer any feedback?

 
Magento Community Magento Community
Magento Community
Magento Community
 
JayKay8875
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2008-04-22
LA
 

In addition,

Although there is error ALT text, the images do display in IE6

but no images in IE7, Safari or FireFox

Strange.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JayKay8875
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2008-04-22
LA
 

YES!!!!

I got it to work!

I copied and paste your code but it had a small correctable issue.

After looking closely I saw this

Your code
REPLACE WITH:

<img id="image" src="<?php echo $_product->getData('remote_image_url'); ?>” alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
but it needed to be:

<img id="image" src="<?php echo $_product->getData('remote_image_url'); ?>" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" />
Thank you for all your help.
 
Magento Community Magento Community
Magento Community
Magento Community
 
bowers2000
Member
 
Total Posts:  31
Joined:  2008-05-21
 

@Tomas G
@Moshes

Can you tell me if this will speed up or slow down load times?  If I wanted Amazon’s EC2 to serve up the images what impact would this have? 

I would like to speed up magento and take some of the burden off my server. 

Please forgive the ignorance.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
JayKay8875
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2008-04-22
LA
 

I am under the impression that it will increase the performance but not 100% sure

See this thread: http://www.magentocommerce.com/boards/viewthread/4353/

 
Magento Community Magento Community
Magento Community
Magento Community
 
MAtt*!
Jr. Member
 
Total Posts:  10
Joined:  2008-07-30
 

JayKay / Tom your fix is awesome, I am having difficulty applying the same technique to Upsell.pthml, crosssell.phtml and shopping cart for thumbs/small image. It does not like getData calls on non-object.

Hoping someone may have solved this issue.

Thanks all.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Puma1337
Jr. Member
 
Total Posts:  7
Joined:  2008-11-28
 

I know this thread is kinda dead, but I used this method and my images won’t show up in the search results or cart.  Any suggestions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mayerwin
Sr. Member
 
Avatar
Total Posts:  182
Joined:  2008-01-15
France
 

You should make sure all phtml templates where images are called are updated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Puma1337
Jr. Member
 
Total Posts:  7
Joined:  2008-11-28
 

I’m pretty sure they all are...any particular place I should look?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mayerwin
Sr. Member
 
Avatar
Total Posts:  182
Joined:  2008-01-15
France
 

I have no idea. All is in your template default files.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Puma1337
Jr. Member
 
Total Posts:  7
Joined:  2008-11-28
 

Well its strange because the images show up when browsing the catalog, but not when searching.  From what I could see from the code, the searching function just calls on the regular view.phtml, so theoretically it should work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Puma1337
Jr. Member
 
Total Posts:  7
Joined:  2008-11-28
 

Ok.  I know for a fact its not in list.phtml, if anyone has any idea how to modify whatever file is calling out the results of the search, so that it works i would greatly appreciate it

I think it has something to do with

<action method="addAttribute"><code>remote_image_url</code></action>

not being in catalogsearch.xml

 
Magento Community Magento Community
Magento Community
Magento Community
 
mjsj
Jr. Member
 
Total Posts:  2
Joined:  2008-12-08
 

I was trying to follow Tomas G tutorials and i still cant get it to work. According to your posts, i have to do the following:

FIND: (approx line 29)

<img id="image" src="<?php echo $this-<helper('catalog/image')-<init($_product, 'image'); ?<” alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />

REPLACE WITH:

<img id="image" src="<?php echo $_product-<getData('remote_image_url'); ?<” alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />
FIND: (approx line 46)

<img id="image" src="<?php echo $this-<helper('catalog/image')-<init($_product, 'image')-<resize(265); ?<” alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />

REPLACE WITH:

<img id="image" src="<?php echo $_product-<getData('remote_image_url'); ?<” alt="<?php echo $this->htmlEscape($_product->getName()) ?>” />

The problem is, that i do not have such a lines in my app/design/frontend/[interface]/[theme]/template/catalog/product/view/media.phtml. Maybe because i am using Magento ver. 1.1.8.

My code looks like this:

<?php
    $_product 
$this->getProduct();
    
$_helper $this->helper('catalog/output');
?>

<?php 
if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
<class="product-image-zoom">
    
<?php
        $_img 
'<img id="image" src="'.$this-<helper('catalog/image')-<init($_product'image').'" alt="'.$this-<htmlEscape($_product-<getName()).'" />';
        echo 
$_helper->productAttribute($_product$_img'image')
    
?>
</p>
<
class="a-center" id="track_hint"><?php echo $this->__('Double click on above image to view full picture'?></p>

<
div class="image-zoom" id="track_outer">
    <
img id="zoom_out" src="<?php echo $this-<getSkinUrl('images/slider_btn_zoom_out.gif') ?<" alt="<?php echo $this-<__('Zoom Out') ?<" class="btn-zoom-out" />
    <
div id="track">
        <
div id="handle"></div>
    </
div>
    <
img id="zoom_in" src="<?php echo $this-<getSkinUrl('images/slider_btn_zoom_in.gif') ?<" alt="<?php echo $this-<__('Zoom In') ?<" class="btn-zoom-in" />
</
div>

    
Event.observe(window'load', function() {
        product_zoom 
= new Product.Zoom('image''track''handle''zoom_in''zoom_out''track_hint');
    
});

<?php else: ?>
    <?php
        $_img 
'<img src="'.$this-<helper('catalog/image')-<init($_product'image')-<resize(265).'" alt="'.$this-<htmlEscape($_product-<getName()).'" />';
        echo 
$_helper->productAttribute($_product$_img'image')
    
?>
<?php 
endif; ?>
<?php 
if (count($this->getGalleryImages()) > 0): ?>
<div class="more-views">
    <
h4><?php echo $this->__('More Views'?></h4>
    <
ul>
    
<?php foreach ($this->getGalleryImages() as $_image): ?>
        
<li>
            <
a href="#" onclick="popWin('<?php echo $this-<getGalleryUrl($_image) ?<', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"><img src="<?php echo $this-<helper('catalog/image')-<init($this-<getProduct(), 'thumbnail', $_image-<getFile())-<resize(56); ?<" alt="<?php echo $this-<htmlEscape($_image-<getLabel()) ?<" title="<?php echo $this-<htmlEscape($_image-<getLabel()) ?<" /></a>
        </
li>
    
<?php endforeach; ?>
    
</ul>
</
div>
<?php endif; ?>

Please let me know what I’m doing wrong, maybe I’m working on a wrong file or something, Thank You

 
Magento Community Magento Community
Magento Community
Magento Community
 
mjsj
Jr. Member
 
Total Posts:  2
Joined:  2008-12-08
 

Hey guys, Please help me out with this problem…

 
Magento Community Magento Community
Magento Community
Magento Community
 
theallgreenstore
Member
 
Total Posts:  33
Joined:  2009-01-08
 

I’m having trouble with this too, is there an updated fix to this?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 5