humanmade / humanmade/replace-files

Media modal in post edit context thumbnail

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
7
Forks
1
PR merge metrics
No merged PRs in 30d

Description

After replacing an image, the old image is still being displayed in the media modal, in the context of the edit post screen, when replacing an image in an existing image block.
The image thumbnails are of the new image but the main thumbnail is still the old one.

Screenshot 2020-09-01 at 10 28 20

This code busts the cache partially it seems

```
add_action( 'replace_files.merge_replacement.replaced', function ( $post_id ) {
// Purge the server's cache.
\Altis\Cloud\Cloudfront_Media_Purge\purge_media_file_cache( $post_id );
});
```

It does eventually load the new image, I tried again after a few hours

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.