英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论