Skip to content

Commit

Permalink
Replace remote images with local image
Browse files Browse the repository at this point in the history
Remove dependency on remote service and showcase how to include images
  • Loading branch information
lcharette committed Mar 13, 2023
1 parent 05b0447 commit 8c0664b
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 23 deletions.
Binary file added app/assets/images/Placeholder_500x300.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/Placeholder_750x450.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/slides/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/slides/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/slides/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions app/templates/pages/about.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- Intro Content -->
<div class="row">
<div class="col-md-6">
<img class="img-responsive" src="https://via.placeholder.com/750x450" alt="">
<img class="img-responsive" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
</div>
<div class="col-md-6">
<h2>About Modern Business</h2>
Expand All @@ -30,7 +30,7 @@
</div>
<div class="col-md-4 text-center">
<div class="thumbnail">
<img class="img-responsive" src="https://via.placeholder.com/750x450" alt="">
<img class="img-responsive" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
<div class="caption">
<h3>John Smith<br>
<small>Job Title</small>
Expand All @@ -49,7 +49,7 @@
</div>
<div class="col-md-4 text-center">
<div class="thumbnail">
<img class="img-responsive" src="https://via.placeholder.com/750x450" alt="">
<img class="img-responsive" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
<div class="caption">
<h3>John Smith<br>
<small>Job Title</small>
Expand All @@ -68,7 +68,7 @@
</div>
<div class="col-md-4 text-center">
<div class="thumbnail">
<img class="img-responsive" src="https://via.placeholder.com/750x450" alt="">
<img class="img-responsive" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
<div class="caption">
<h3>John Smith<br>
<small>Job Title</small>
Expand All @@ -87,7 +87,7 @@
</div>
<div class="col-md-4 text-center">
<div class="thumbnail">
<img class="img-responsive" src="https://via.placeholder.com/750x450" alt="">
<img class="img-responsive" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
<div class="caption">
<h3>John Smith<br>
<small>Job Title</small>
Expand All @@ -106,7 +106,7 @@
</div>
<div class="col-md-4 text-center">
<div class="thumbnail">
<img class="img-responsive" src="https://via.placeholder.com/750x450" alt="">
<img class="img-responsive" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
<div class="caption">
<h3>John Smith<br>
<small>Job Title</small>
Expand All @@ -125,7 +125,7 @@
</div>
<div class="col-md-4 text-center">
<div class="thumbnail">
<img class="img-responsive" src="https://via.placeholder.com/750x450" alt="">
<img class="img-responsive" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
<div class="caption">
<h3>John Smith<br>
<small>Job Title</small>
Expand All @@ -151,22 +151,22 @@
<h2 class="page-header">Our Customers</h2>
</div>
<div class="col-md-2 col-sm-4 col-xs-6">
<img class="img-responsive customer-img" src="https://via.placeholder.com/500x300" alt="">
<img class="img-responsive customer-img" src="{{ asset('assets/images/Placeholder_500x300.png') }}" alt="">
</div>
<div class="col-md-2 col-sm-4 col-xs-6">
<img class="img-responsive customer-img" src="https://via.placeholder.com/500x300" alt="">
<img class="img-responsive customer-img" src="{{ asset('assets/images/Placeholder_500x300.png') }}" alt="">
</div>
<div class="col-md-2 col-sm-4 col-xs-6">
<img class="img-responsive customer-img" src="https://via.placeholder.com/500x300" alt="">
<img class="img-responsive customer-img" src="{{ asset('assets/images/Placeholder_500x300.png') }}" alt="">
</div>
<div class="col-md-2 col-sm-4 col-xs-6">
<img class="img-responsive customer-img" src="https://via.placeholder.com/500x300" alt="">
<img class="img-responsive customer-img" src="{{ asset('assets/images/Placeholder_500x300.png') }}" alt="">
</div>
<div class="col-md-2 col-sm-4 col-xs-6">
<img class="img-responsive customer-img" src="https://via.placeholder.com/500x300" alt="">
<img class="img-responsive customer-img" src="{{ asset('assets/images/Placeholder_500x300.png') }}" alt="">
</div>
<div class="col-md-2 col-sm-4 col-xs-6">
<img class="img-responsive customer-img" src="https://via.placeholder.com/500x300" alt="">
<img class="img-responsive customer-img" src="{{ asset('assets/images/Placeholder_500x300.png') }}" alt="">
</div>
</div>
<!-- /.row -->
Expand Down
20 changes: 10 additions & 10 deletions app/templates/pages/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
</ol>
<div class="carousel-inner">
<div class="item active">
<img src="https://via.placeholder.com/1900x1080&text=Slide One" alt="First slide">
<img src="{{ asset('assets/images/slides/1.png') }}" alt="First slide">

<div class="carousel-caption">
First Slide
</div>
</div>
<div class="item">
<img src="https://via.placeholder.com/1900x1080&text=Slide Two" alt="Second slide">
<img src="{{ asset('assets/images/slides/2.png') }}" alt="Second slide">

<div class="carousel-caption">
Second Slide
</div>
</div>
<div class="item">
<img src="https://via.placeholder.com/1900x1080&text=Slide Three" alt="Third slide">
<img src="{{ asset('assets/images/slides/3.png') }}" alt="Third slide">

<div class="carousel-caption">
Third Slide
Expand Down Expand Up @@ -104,32 +104,32 @@
</div>
<div class="col-md-4 col-sm-6">
<a href="portfolio-item.html">
<img class="img-responsive img-portfolio img-hover" src="https://via.placeholder.com/700x450" alt="">
<img class="img-responsive img-portfolio img-hover" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="portfolio-item.html">
<img class="img-responsive img-portfolio img-hover" src="https://via.placeholder.com/700x450" alt="">
<img class="img-responsive img-portfolio img-hover" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="portfolio-item.html">
<img class="img-responsive img-portfolio img-hover" src="https://via.placeholder.com/700x450" alt="">
<img class="img-responsive img-portfolio img-hover" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="portfolio-item.html">
<img class="img-responsive img-portfolio img-hover" src="https://via.placeholder.com/700x450" alt="">
<img class="img-responsive img-portfolio img-hover" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="portfolio-item.html">
<img class="img-responsive img-portfolio img-hover" src="https://via.placeholder.com/700x450" alt="">
<img class="img-responsive img-portfolio img-hover" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
</a>
</div>
<div class="col-md-4 col-sm-6">
<a href="portfolio-item.html">
<img class="img-responsive img-portfolio img-hover" src="https://via.placeholder.com/700x450" alt="">
<img class="img-responsive img-portfolio img-hover" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
</a>
</div>
</div>
Expand All @@ -153,7 +153,7 @@
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis, omnis doloremque non cum id reprehenderit, quisquam totam aspernatur tempora minima unde aliquid ea culpa sunt. Reiciendis quia dolorum ducimus unde.</p>
</div>
<div class="col-md-6">
<img class="img-responsive" src="https://via.placeholder.com/700x450" alt="">
<img class="img-responsive" src="{{ asset('assets/images/Placeholder_750x450.png') }}" alt="">
</div>
</div>
<!-- /.row -->
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ Encore
// Copy Favicons
.copyFiles({ from: './app/assets/favicons', to: 'favicons/[path][name].[hash:8].[ext]' })

// Copy images
.copyFiles({ from: './app/assets/images', to: 'images/[path][name].[hash:8].[ext]' })

// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
.splitEntryChunks()

Expand Down

0 comments on commit 8c0664b

Please sign in to comment.