@baris Thank you very much for the example. I use a custom theme and this works perfectly as expected in some parts of the template. I changed it in the following files:
modules/nodebb-theme-name/templates/partials/menu.tpl
modules/nodebb-theme-name/templates/partials/account/header.tpl
modules/nodebb-theme-name/templates/account/edit.tpl
And it's working. A new uploaded profile-picture is immediately shown after upload, also without deleting the browser-cache.
Now in the upload-modal:
modules/nodebb-theme-name/templates/partials/modals/change_picture_modal.tpl
the old picture is still shown. Adding the cacheBuster
-query-string there doesn't work, the timestamp is not appended. Is there a hook also for this case?
Also is there a list of all possible hooks/events that are happening in the system?
Another thing I noticed is, that after uploading a new profile-picture, the success-callback changes the picture in the header-menu and in the edit-page immediately, but not in the profile-header part (after refreshing, with the new cacheBuster, it is changed).
I've traced it to this file: app/public/src/client/account/edit.js.
How can I now react on the image-change in my custom theme?