-
Notifications
You must be signed in to change notification settings - Fork 5
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
Improve media upload #2
Comments
In each folder after the first upload maybe keep track of post ID and hash+name of figures, in
Since images are now uploaded with the post as parent, I could also list existing images (in the WordPress gallery) that have the post as parent, and remove those that are no longer needed. It is very important to not keep old files, because bloating the gallery doesn't sound like a good idea. |
Juggling files through the WP REST API is beyond me but just want to report that the first point in OP doesn't seem to be what happens now: I iterated over a couple versions of a post and did get my gallery bloated. Would be happier with the (brute force) method of deleting, then re-adding everything. |
Current workflow that works but could be improved because it's so fragile
I delete all media associated to a post and re-upload everything when I update the post.
No longer true 🎉
I also change src of img in the post by using regex (from the relative reference created by rmarkdown to an absolute URL I got from the API after uploading the image) and it should be XPat stuff.The text was updated successfully, but these errors were encountered: