am trying to display the images of my products in a shopping cart and this is the code am using to do that...
<img src=" <?php echo 'image/'. $product['picture']?>" /><br />
but the images do not show. I have stored the images in a folder called image outside applications.
You can use base_url to get full path without index.php.
Hope you images folder exist in project root folder.
<img src="<?php echo base_url('image/'. $product['picture']);?>" />
Related
i am beginner of Laravel 8. i creating simple project. but when i view the project images are not shown.
View Page
Index.php
<div>
<img src="{{asset('/images/chocolate-ice.jpg')}}" id="Chocolate" class="photo" width="100" height="100" data-toggle="modal" data-target="#exampleModal">
<b>Chocolate</b>
</div>
Folder structure
If you want to use Blade your template/view must end in .blade.php. That is how the view system knows what view engine to use. When it is just .php it does not use the Blade compiler to parse the template.
I am trying to using image tag to load image to a component template.
By
<img src="\images\subfolder\image.jpg" />
but the images don't show in the page.
I am wondering why.
Thank you.
Try this,
<img src="<?php echo JURI::root()?>images/subfolder/image.jpg" />
Hope its works..
I'm running Wordpress on WAMP right now and I'm trying to figure out how to correctly reference an image that i'm using in my header for all my pages.
If I write this:
<img src="wp-content/themes/my-theme/images/SSBlogoALPHA.png">
the logo shows up on the WP homepage, but not on any subsequent pages.
If I write
<img src="../wp-content/themes/my-theme/images/SSBlogoALPHA.png">
the logo shows up on all subsequent pages, but not the homepage.
to be honest I don't know what the "../" does or where my root folder is supposed to be when writing a directory path but these are the ways that i've seen other people do this. Any ideas? Thanks!
you can get the images by following way
<img src="<?php bloginfo('template_directory'); ?>/images/SSBlogoALPHA.png" alt=""/>
i have used the following code but it didnt work
/images/ncr.jpg" alt="ncr.com" />
I have pur my image in the images folder of twentyeleven child theme
can anyone help
Thanks in advance..
The theme folder URL can be found at /wp-content/themes/twentyeleven.
Your header file is actually included at the root level, and as such relative paths won't work.
WordPress provides a function to access your current theme's directory, and as a result you should use this code:
<img src="<?php echo get_template_directory_uri(); ?>/images/ncr.jpg" alt='ncr.com'>
I installed the facebook connect from belvg in my store (filipeferminiano.com/lojateste) and I want to change the place of the facebook button. Where is the code that specifies these features? I already looked at the module's files but I didn't fint it.
Anyone can help me?
login button is located in app/design/frontend/default/default/template/facebookfree/links.phtml
<img src="<?php echo $this->helper('facebookfree/active')->getLoginImg()?>" alt="<?php echo $this->__('Connect with Facebook')?>" />