images aren't displayed locally - php

I'm doing the maintenance on a project developed with the symfony framework version 2.7. The problem I'm encountering is that the images aren't displayed locally but they are displayed in the online version.
The images are stored in web/uploads/Images. Following code is the one used to display the site's logo: <img src="{{ asset(setting.logo) }}?{{"now"|date("d/m/Y H:i:s")}}" data-bs-hover-animate="swing" class="logo">.
When I inspect local version with my browser, it displays: <img src="/uploads/logo.png?30/12/2019 13:37:21" data-bs-hover-animate="swing" class="logo"> and the logo is not displayed.
But when I modify the source code in local : <img src="{{ asset('uploads/Images/LogoALEX.png') }}?{{"now"|date("d/m/Y H:i:s")}}" data-bs-hover-animate="swing" class="logo"> the image is displayed.
Now I don't want to modify the source code since it works already online.please I'd like to have an explanation for this issue and know how to fix it.

Related

Add administrable image for a page in Drupal 8

I am using Drupal 8 and i created a page where i display an image and a form inside a block as an inline template.
This looks like this :
<div class="col-md-6" style="padding-right:0px; padding-left:0px;">
<img src="{{ base_path ~ directory }}/sites/default/files/Dinard_S.jpg" id="b-frm-img" style="width: 400px; height:300px;"></div>
Then another div contains my form. What i'm trying to do is to make user with no code knowledge able to change this specific image from the drupal admin.
Is there any way to do this?
I created an admin page to upload an image in a dedicated folder using managed_file type in the form. Seems there is no better ways.

broken image icon in my laravel project

I have an img folder within the public folder of my Laravel 5.4 project. When I refer to the image with the following code.
<img class="mb-3 img-fluid rounded" src="public/img/pdx.jpg" alt="Portland">
I get the broken image icon on the page. I am using Bootstrap 4 cdn for the this page. What am I doing wrong. Any help would be appreciated.
Just remove public from src attribute and then try. Because Laravel only understand assets within public folder

Magento Stops Outputting HTML When Encountering Images

This is for a Magento 1.8.0.0 shop. I purchased a bulk image plugin which required the Magento Connect Manager to install. For the install, I temporarily gave 777 permissions to the entire shop. The plugin installed successfully, however at this point the HTML output just stops when images are encountered.
For example, here are the bottom lines of three separate category pages:
<div class="grid-inner"> <a href="http://www.myshop.com/shop/index.php/accessories/buddy-club-racing-spec-bucket-seat-wide-black.html?___SID=U" title="Buddy Club Racing Spec Bucket Seat (Wide) Black" class="product-image"><img class="pr-img" src="
<div class="grid-inner"> <a href="http://www.myshop.com/shop/index.php/aero/buddy-club-body-kit-rsx-02-04.html?___SID=U" title="Buddy Club Body Kit RSX 02-04" class="product-image"><img class="pr-img" src="
<a href="http://www.myshop.com/shop/index.php/braking/dynalite-big-brake-kit-civic-90-03-240mm-oe-disc-11-rotors-drilled.html?___SID=U" title="DYNALITE BIG BRAKE KIT: CIVIC 90-03 (240mm OE DISC) - 11" ROTORS - DRILLED" class="product-image"><img class="pr-img" src="
All of the pages end this way and I can't even browse products.
I have tried re-doing the permissions to a number of different values, removed the plugin, contacted both my template vendor and the plugin vendor, turned on error logging in PHP and switching back to the default theme.
None of these actions have produced a difference. I would appreciate any help in troubleshooting.
h.ubk

Laravel not showing images on localhost:8000

I am making a web page on laravel 5, I haven't used laravel since it was at 3 but I really like the new features that it has.
Everything its working fine on an app that it's almost finished, but I have a problem with images.
I am trying to display an image to a view and it's just not showing, I get the little image icon that we all know.
I have used all the methods that I have found on larval docks and in the forums.
including:
assets
URL
HTML (It didn0t work at all)
Direct Url in the view
I am actually using just Artsian serve so the URL would be something like:
http://localhost:8000/uploads/images/posts/1456814127.jpg
The folder its un public folder so in my opinion its the correct url.
With diffrent methos i aslo called the image from the pc path and its the same result. I am using intervention to upload the image by the way.
Any idea?
EDIT:
Ok i tried on localhost of wamp server and the image output worked. I dont know why but it did.
EDIT 2:
I am on laravel Homestead now, and it's still not working. I am angry by this point. Please help me!!
Here it's my Controller:
public function posts()
{
$posts = DB::table('posts')->paginate(3);
//page heading
$title = 'Latest Posts';
return view('frontend.posts.index')->with(compact('posts', 'title'));
}
This it's my view:
<a href="#" class="image">
<img src="{{ asset('uploads/images/posts/'.$post->post_image) }}" class="img-rounded">
<span class="hover-zoom"></span>
</a>
At laravel homestead the output link it's:
http://krubbit.dev/uploads/images/posts/1457074877.jpg
The dir structure of the image location:
-Laravel-dir
-Public
-Uploads
-images
-posts
-1457074877.jpg
Something like this
<img src="{{ asset('uploads/images/posts/1456814127.jpg') }}" />
Please use url funcion of Laravel as shown below
<a href="#" class="image">
<img src="{{url('asset/uploads/images/posts/'.$post->post_image)}}" class="img-rounded">
<span class="hover-zoom"></span>
</a>
Hope this will help..!!

Some images only showing alt text in Firefox but load fine in Safari or Chrome yet other images on the same page load fine

I'm making a simple website for myself using wordpress and some hacking to try and teach myself a little about web coding for fun. I've set up my website and http://jonhocking.co.uk and I'm using a series of 4 squares on the front page to navigate around the site. Three of these link to categories and these images display perfectly fine. The other links to a wordpress page and although I've used the same code, it's only showing the alt text for the image. This bug only happens when using Firefox. I've tested it with Chrome and Safari which both show the page as expected and I haven't tested it with IE since I'm using OS X and haven't had the chance to. The same problem occurs with the logo in the top left corner. This logo links to the main page and only shows the alt text in firefox. I have also tried using mobile Safari on the iPhone and this has the same problem.
The code for the main index:
<?php get_header(); ?>
<div class="main_link">
<img src="<?php bloginfo('template_directory'); ?>/images/Current.png" />
<img src="<?php bloginfo('template_directory'); ?>/images/Previous.png" />
<a href= "http://jonhocking.co.uk/?cat=1" ><img src="<?php bloginfo('template_directory'); ?>/images/Blog.png" /></a>
<img src="<?php bloginfo('template_directory'); ?>/images/BlogRoll.png" alt = "Blog-Roll"/>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
The only difference is the addition of alt text to the Blog-Roll image so I can at least see something loading in FF and also the fact that Blog-Roll is a page not a category. Have I missed out something obvious here?
Thanks,
Jon
The blogroll.png image is not appearing for me in any browers - I just checked safari and chrome. Perhaps you have it cached in those browsers and removed it from the server accidently.
Accessed it directly with http://jonhocking.co.uk/wp-content/themes/UpstartBloggerModicus2c/images/BlogRoll.png also - this image does not exist or is corrupt.
Firefox says, The image “http://jonhocking.co.uk/wp-content/themes/UpstartBloggerModicus2c/images/BlogRoll.png” cannot be displayed, because it contains errors..

Categories