Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上传的图片过大,导致加载太慢 #5196

Open
zhuozhm opened this issue Jan 16, 2024 · 10 comments
Open

上传的图片过大,导致加载太慢 #5196

zhuozhm opened this issue Jan 16, 2024 · 10 comments
Labels
priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@zhuozhm
Copy link

zhuozhm commented Jan 16, 2024

Your current Halo version

laste

Describe this feature

2核2g3m服务器对于手机拍摄的相片上传到halo的图库,打开速度很慢。
建议优化一下
https://blog.zhuozhm.fun/photos
1.保证图片的画质的前提下,对于上传的图片提示是否需要进行压缩,以及可以手动调整压缩的强度。
IMG_20211114_163849

IMG_20211114_163849
--------同样的两张图片,一张7m多,压缩后剩下2m多

Additional information

No response

@zhuozhm
Copy link
Author

zhuozhm commented Jan 16, 2024

非常感谢

@JohnNiang
Copy link
Member

JohnNiang commented Jan 16, 2024

目前,你可以试试 WebP 插件以及对应的 WebP 服务来优化图片的问题。

另外一个方案就是使用第三方对象存储,例如 S3。

/triage needs-information

@f2c-ci-robot f2c-ci-robot bot added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jan 16, 2024
@zhuozhm
Copy link
Author

zhuozhm commented Jan 16, 2024

Snipaste_2024-01-16_23-29-03
Snipaste_2024-01-16_23-29-27
Snipaste_2024-01-16_23-29-40
------------该设置的都设置了,但是没生效

@JohnNiang
Copy link
Member

/ping @halo-dev/sig-halo

@guqing
Copy link
Member

guqing commented Jan 17, 2024

目前,你可以试试 WebP 插件以及对应的 WebP 服务来优化图片的问题。

另外一个方案就是使用第三方对象存储,例如 S3。

/triage needs-information

webp 这个插件好像不会这相册这个页面生效

@ruibaby
Copy link
Member

ruibaby commented Jan 18, 2024

当前 WebP 这个插件仅支持文章内容的图片链接替换。这个问题还是建议在本地存储策略支持生成不同尺寸的图片,相关 issue:#2387

支持生成不同尺寸的图片之后,还可以在主题实现 Responsive images,可以由调用方决定尺寸并动态生成。

@ruibaby
Copy link
Member

ruibaby commented Jan 18, 2024

当前 WebP 这个插件仅支持文章内容的图片链接替换。这个问题还是建议在本地存储策略支持生成不同尺寸的图片,相关 issue:#2387

支持生成不同尺寸的图片之后,还可以在主题实现 Responsive images,可以由调用方决定尺寸并动态生成。

@halo-dev/sig-halo 这对于页面访问性能会有较大帮助,可以重视一下。

@ruibaby ruibaby added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Mar 25, 2024
@flycati
Copy link

flycati commented Apr 1, 2024

期待这个特性尽快上线,mac在高分辨率屏幕上截一张图好几兆,非常占用储存空间和带宽

@ruibaby
Copy link
Member

ruibaby commented Apr 1, 2024

期待这个特性尽快上线,mac在高分辨率屏幕上截一张图好几兆,非常占用储存空间和带宽

暂时可以考虑使用 https://www.halo.run/store/apps/app-mhQIV 插件,利用 Cloudinary 服务可以实现无入侵的压缩图片,还支持响应式图片和转换为 webp。使用之后会有明显的改善。

@flycati
Copy link

flycati commented Apr 1, 2024

期待这个特性尽快上线,mac在高分辨率屏幕上截一张图好几兆,非常占用储存空间和带宽

暂时可以考虑使用 https://www.halo.run/store/apps/app-mhQIV 插件,利用 Cloudinary 服务可以实现无入侵的压缩图片,还支持响应式图片和转换为 webp。使用之后会有明显的改善。

感谢回复,我研究一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

5 participants