WP .htaccess redirect localhost files

Redirect images in wp-content/uploades on localhost to live website.

Serve images from a live site on localhost environment to avoid downloading the files and still have a good representation of the design implementation locally.

# Uploads
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !pagespeed
    RewriteRule ^wp-content/uploads(.*)$ https://example.com/wp-content/uploads/$1 [L,R]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !pagespeed
    RewriteRule . /index.php [L]
</IfModule>