Skip to content

Fetch WordPress media from remote destinations, without synchronizing them to your local device.

Notifications You must be signed in to change notification settings

webreact/media-from-remote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Media from Remote

This must-use plugin for WordPress enables the site to load media files from a remote URL, bypassing the need for syncing local media files (e.g. using rsync) in development or staging environments.

It automatically adjusts media URLs if the file is not found locally by replacing the local development domain with the production domain. This ensures images and other media assets are always accessible—even if they haven't been copied to the local server.

💡 This is especially useful in development environments like Lando (project.lndo.site) where you don’t want to keep syncing media libraries.


Features

  • Overrides wp_get_attachment_url() to fallback to a remote domain.
  • Updates srcset values from wp_calculate_image_srcset() to match the fallback URL.
  • Eliminates the need to copy media locally during development or staging.

Usage

Add this file to the wp-content/mu-plugins/ directory of your WordPress installation.

About

Fetch WordPress media from remote destinations, without synchronizing them to your local device.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages