pref: optimize png to webp

This commit is contained in:
KUN1007 2023-10-20 01:26:00 +08:00
parent 5c659ff221
commit f8e2a4d58f
12 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@
<link
rel="icon"
type="image/svg+xml"
href="/src/assets/images/favicon.png"
href="/src/assets/images/favicon.webp"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -2,7 +2,7 @@
import { randomNum } from '@/utils/random'
// 获取本地图片文件,注意这里不能用 @ 作为基础路径,只能用 ..
const getAssetsFile = (name: string) => {
return new URL(`../../assets/images/alert/${name}.png`, import.meta.url).href
return new URL(`../../assets/images/alert/${name}.webp`, import.meta.url).href
}
const number = randomNum(0, 2)

View file

@ -15,7 +15,7 @@ defineEmits(['showKUNGalgameHamburger'])
<!-- 总容器 -->
<div class="container">
<div class="kungalgame">
<img src="../../assets/images/favicon.png" alt="KUNGalgame" />
<img src="@/assets/images/favicon.webp" alt="KUNGalgame" />
<span>{{ $tm('header.name') }}</span>
</div>
<!-- 交互栏目 -->

View file

@ -62,7 +62,7 @@ onBeforeRouteLeave(() => {
<div class="kungalgame">
<!-- 网站的名字和网站图标 -->
<RouterLink to="/kun">
<img src="@/assets/images/favicon.png" alt="KUNgal" />
<img src="@/assets/images/favicon.webp" alt="KUNgal" />
</RouterLink>
<RouterLink to="/kun">
<span>{{ $tm('header.name') }}</span>