命令 (GetMimeType) 不适用于驱动程序 (Gd)

Command (GetMimeType) is not available for driver (Gd)

提问人:dapidmini 提问时间:11/1/2023 更新时间:11/1/2023 访问量:17

问:

我正在尝试使用干预/图像库来调整我上传的图像文件的大小。但我收到此错误:

"Command (GetMimeType) is not available for driver (Gd)."

当我检查时,结果是:print_r(gd_info())

Array ( 
  [GD Version] => bundled (2.1.0 compatible) 
  [FreeType Support] => 1 
  [FreeType Linkage] => with freetype 
  [GIF Read Support] => 1 
  [GIF Create Support] => 1 
  [JPEG Support] => 1 
  [PNG Support] => 1 
  [WBMP Support] => 1 
  [XPM Support] => 1 
  [XBM Support] => 1 
  [WebP Support] => 1 
  [BMP Support] => 1 
  [AVIF Support] => 1 
  [TGA Read Support] => 1 
  [JIS-mapped Japanese Font Support] => 
)

根据这个问题和这个链接中的答案,他们说这是解决方案(如下图所示)

solution

我上传的文件只有 1280x960 像素(157KB),而我的设置是这样的:php.ini

memory_limit=512M
post_max_size=40M
upload_max_filesize=40M

那么我错过了什么?任何帮助都是值得赞赏的。

Laravel 文件上传 GD 图像大小 调整干预

评论

0赞 francisco 11/6/2023
Hello @dapidmini 帮助

答: 暂无答案