Webp图像加载问题。在浏览器中显示代码而不是显示图像。

huangapple go评论60阅读模式
英文:

Webp image loading Issue. Its show Code in Browser instead of showing images

问题

I have used Laravel MediaLibrary,它将用户上传的图像转换为WebP格式,通过img src调用时显示正常点击此处查看

但是,如果我们在新标签页中打开该图像,它会显示类似于以下代码:
RIFFH$��WEBPVP8 <$��0º�*ôw>m6–I$"¬¤#2Y9
等等... 点击此处查看

这是一个带有Apache的Ubuntu服务器。

是否存在服务器配置问题,因为在本地环境中一切都很完美,如果在cPanel服务器上上传,则可以正常工作。

英文:

i have used laravel-medialibrary and it convert user uploaded image to webp and it display fine when image called via img src see here.

But if we open that image in new tab it shows code like
RIFFH$��WEBPVP8 <$��0º�*ôw>m6–I$"¬¤#2Y9

and so on ... see here

It's a ubuntu server with apache.

is anything on server configuration because its perfect in local environment and work perfectly if uploaded in cpanel servers

答案1

得分: 1

问题在我将图像驱动程序从gd更改为imagick后得以解决。

英文:

issue fixed when I changed image driver to imagick from gd

huangapple
  • 本文由 发表于 2023年6月13日 02:18:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76459312.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定