Skip to content

Commit

Permalink
Merge pull request #150 from HereIsYui/master
Browse files Browse the repository at this point in the history
修复图片重复压缩
  • Loading branch information
adlered authored Oct 9, 2024
2 parents 1d62796 + 29629e1 commit d5b40b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/resources/js/chat-room.js
Original file line number Diff line number Diff line change
Expand Up @@ -1434,10 +1434,10 @@ border-bottom: none;
dom.innerHTML = content;
let imgList = dom.querySelectorAll('img');
imgList.forEach(ele=>{
ele.setAttribute('originalsrc', ele.src);
//if(ele.src.startsWith('https://file.fishpi.cn')){
ele.src = ele.src + '?imageView2/0/w/150/h/150/interlace/0/q/90'
//}
ele.setAttribute('originalsrc', ele.src);
if(ele.src.startsWith('https://file.fishpi.cn')){
ele.src = ele.src.split('?')[0] + '?imageView2/0/w/150/h/150/interlace/0/q/90'
}
})
return dom.innerHTML;
},
Expand Down

0 comments on commit d5b40b3

Please sign in to comment.