Title: Lazy Loading Support
Last modified: December 10, 2019

---

# Lazy Loading Support

 *  [chibwe](https://wordpress.org/support/users/chibwe/)
 * (@chibwe)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/lazy-loading-support/)
 * Hi, I’m really enjoying this theme. How can I add lazy loading support to it?
   Is it already included and I’m just missing it? Thanks in advance. Thanks for
   the theme.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Theme Author [Anders Norén](https://wordpress.org/support/users/anlino/)
 * (@anlino)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/lazy-loading-support/#post-12230026)
 * Hi [@chibwe](https://wordpress.org/support/users/chibwe/),
 * Glad you like it! There’s no lazy loading built-in, but there are plugins that
   add lazy loading images. I can’t guarantee that they will be fully compatible
   with Chaplin, but they should work for the images in the post content, at least.
 * — Anders
 *  Thread Starter [chibwe](https://wordpress.org/support/users/chibwe/)
 * (@chibwe)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/lazy-loading-support/#post-12232131)
 * Hi [@anlino](https://wordpress.org/support/users/anlino/),
    Yes, I noticed that
   post content is lazy loaded. What files would I have to mod in order to enable
   lazy loading? I tried modifying the preview template partial with the code below.
   It worked for images that are initially loaded up on a given page. Doesn’t work
   for the ones loaded upon scrolling down the page. What could be causing this?
   Please let me know if You need more info to help clarify things.
 *     ```
       if ( $aspect_ratio !== 'original' ) : ?>
   
       	<a href="<?php the_permalink(); ?>">
       		<img class="faux-image dd-rounded-top aspect-ratio-<?php echo $aspect_ratio; ?>" src="<?php echo esc_url( $image_url ); ?>">
       	</a>
   
       <?php else : ?>
   
       	<a href="<?php the_permalink(); ?>">
       		<?php 
       		if ( has_post_thumbnail() && ! post_password_required() ) {
       			the_post_thumbnail( $post->ID, $image_size ); 
       		} else {
       			echo '<img src="' . esc_url( $fallback_image_url ) . '" />';
       		}
       		?>
       	</a>
   
       <?php endif; ?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Lazy Loading Support’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/chaplin/2.6.8/screenshot.png)
 * Chaplin
 * [Support Threads](https://wordpress.org/support/theme/chaplin/)
 * [Active Topics](https://wordpress.org/support/theme/chaplin/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/chaplin/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/chaplin/reviews/)

## Tags

 * [images](https://wordpress.org/support/topic-tag/images/)
 * [lazy loading](https://wordpress.org/support/topic-tag/lazy-loading/)
 * [optimization](https://wordpress.org/support/topic-tag/optimization/)

 * 2 replies
 * 2 participants
 * Last reply from: [chibwe](https://wordpress.org/support/users/chibwe/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/lazy-loading-support/#post-12232131)
 * Status: not resolved