richtabor / MerlinWP

Better WordPress Theme Onboarding
https://merlinwp.com
GNU General Public License v3.0
691 stars 140 forks source link

Check for local images first before importing from external URL #128

Open JiveDig opened 5 years ago

JiveDig commented 5 years ago

This one is a bit crazy, but would be awesome for import speed. What if we could define a 'local_image_dir' that we could store the demo images inside our theme/plugin/merlin? That way, when the content (xml) importer goes to grab an image, it first checks if file_exists() in our image directory... if it does, grab it from there and save all that time/bandwidth. I tried doing this by editing my xml file but couldn't get it to work.

I'm using merlin in a "demo importer" plugin so it wouldn't be a huge deal to have all the images in the plugin. It would take the full demo import from 3-5min (current) to like 15-45 seconds depending how many images.

Thoughts?

richtabor commented 5 years ago

A really neat idea. I'm not sure how it'd work — but it would increase speeds quite a bit. 👍