Migrate token to webp
This commit is contained in:
parent
31d1d352f2
commit
2f66019a2a
@ -276,7 +276,7 @@ async function migrationPngWebp_1_5_34() {
|
|||||||
await Actor.updateDocuments(actorsUpdates);
|
await Actor.updateDocuments(actorsUpdates);
|
||||||
game.actors.forEach(actor => {
|
game.actors.forEach(actor => {
|
||||||
if (actor.data.token.img.match(regexOldPngJpg)){
|
if (actor.data.token.img.match(regexOldPngJpg)){
|
||||||
actor.update({ "data.token.img": convertImgToWebp(actor.data.token.img) });
|
actor.update({ "token.img": convertImgToWebp(actor.data.token.img) });
|
||||||
}
|
}
|
||||||
const actorItemsToUpdate = prepareDocumentsImgUpdate(actor.items);
|
const actorItemsToUpdate = prepareDocumentsImgUpdate(actor.items);
|
||||||
actor.updateEmbeddedDocuments('Item', actorItemsToUpdate);
|
actor.updateEmbeddedDocuments('Item', actorItemsToUpdate);
|
||||||
|
Loading…
Reference in New Issue
Block a user