-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import attachment posts from staging #93
base: trunk
Are you sure you want to change the base?
Conversation
@dd32 got a sec for an opinion here? The main reason for doing this is so that we have attachment posts with matching IDs, so there's (hopefully) identical behaviour from blocks running locally as from prod. With respect to the files themselves, I'm undecided whether it should:
What's your take? |
Assuming that the IDs match between local and prod, this doesn't seem like a terrible idea. It would also allow for image-editing functions (and others) to be used on the local copy.. It would not necessarily require updating the post contents to use the local image URLs though, from my understanding it should just work if it's got the remote urls in the post content still?
But this also sounds like a potential solution, but it would probably require a plugin to filter the URLs, that would then require ongoing maintenance, as I believe WordPress has moved away from storing absolute paths (on disk, and http urls) as part of the media metadata. That would make this a potentially more complicated and more likely to have side-effects. One thing that comes to mind here, is that there's some work being done around webp's in core that would expect the source-files to exist on disk for on-the-fly/background-processing conversion. |
I went with the first option, thanks for the advice. @ryelle this seems to work ok but isn't thoroughly tested. I'm not entirely clear on whether or not it solves the issue of (for ex) different lazy loading behaviour on local. |
This imports attachment posts to the local env. Possible solution to the different image behaviour we've been seeing on local vs production.
WIP.