Skip to content

Optionally skip downloading images and instead just use fake example images #6

@joeguilmette

Description

@joeguilmette

There should be a flag to skip downloading all images and instead replace them locally with example images. And instead of actually creating them all, try to do something creative where we aren't actually creating full images but instead maybe something like:

  1. Create one single real image per unique dimensions on the target site.
    • Add one small image file per dimensions to wp-content.
    • These are the only images that actually exists as data on disk.
  2. Populate the directory tree with links
    • During a setup/pre-build step, create a directory tree based on the file manifest from the source site, and populate it with symlinks to real image.
    • For each “fake image,” create a filesystem link (hard link or symlink) pointing to that one real image but give it a unique filename and path.
    • The filesystem now reports many files, but they all share the same underlying data.

This might fall over when imported into Local though? But it will likely save a lot of time if we have to download 100k product images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions