• Resolved carryoncoding

    (@carryoncoding)


    Hi, in a previous post, you said:

    Base WordPress does not support “replacement” of media objects.

    There are plugins out there that may help you, but you need to be sure it will preserve your media meta data (such as description).

    Has this been addressed since then in a more recent update to media-sync?

    I want to replace low-res images with hi-res versions. I have FTP’d the hi-res files into the appropriate folders and overwritten the lo-res copies.

    But the website continues to display low-res images.

    How do I modify the database to display the hi-res version?
    (and b. where is it getting the low-res version from????)

    Very many thanks.
    Phil.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author erolsk8

    (@erolsk8)

    Hi Phil,

    I just tried to modify one image directly (by adding some text on top of it) and after clearing browser cache and reloading the page – changes showed up.

    Also, I highly doubt that modifying database would solve this issue. This is an example of what WordPress saves to wp_postmeta database table in order to locate files on your server:

    | meta_key          | meta_value                      |
    | _wp_attached_file | 2024/02/img.webp                |
    | _wp_attached_file | 2024/02/img-e1699313363208.webp |

    So it’s just a path to your image (relative to uploads directory). This means that keeping the same file name doesn’t require updating the database. If I understand what you meant correctly.

    These are some of the reasons you might not see new hi-res images:

    • Browser Cache (I use this handy extension)
    • Server Cache (memcached, redis, etc. manually configured or if using performance plugins)
    • Different thumbnail sizes
    • Crop or other edits made in Media Library (ending with -e{timestamp})
    • Resized/scaled images if uploading large images through Media Library (ending with -scaled.{ext})

    As you can see, this greatly depends on theme, plugins, and overall setup you’re using.

    So it wasn’t addressed and there are no plans to do so. Because at least for now, it seems like it is out of the scope of this plugin and it also sounds quite “destructive”. But if word “sync” gives the impression that this plugin can change or delete actual files, I would agree that name is misleading then. But I’m very hesitant to add such irreversible options. So plugin can only create new database records. which is even possible to cleanup (with some dev knowledge) since each imported items is flagged with _msc=1 meta data.

    Anyway, I’m sorry for the lack of options or confusion on the scope, but I hope these details might help you resolve this strange issue.

    Erol

    • This reply was modified 1 year, 1 month ago by erolsk8. Reason: list formatting
    Thread Starter carryoncoding

    (@carryoncoding)

    Thanks so much for this detailed explanation.

    I reset the various caches as you described, and the site is now behaving as expected. The hi-res images are being displayed.

    Thanks again,

    Phil.

    Plugin Author erolsk8

    (@erolsk8)

    Nice, I’m glad it worked! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Updating Existing Files (again)’ is closed to new replies.