Update Images after edit via php
After editing images directly inside the upload folder via PHP-functions, I managed to automatically regenerate the meta data, the thumbnails and the WebP copies. (Checked via FTP! Even the displayed meta data values are right)
But the displayed images (via HTTPS) in the frontend and in some parts of the backend are often still the old ones.
This does not happen if one uses the rotate / crop functions + “Save”-Button in the media library.
What are the related php-functions which force wordpress (and jetpack and caching plugins etc.) to update and use the new picture.
Please only answers about php code, not plugins!
Leave an answer