【问题标题】:modx phpthumbof returns strange imagemodx phpthumbof 返回奇怪的图像
【发布时间】:2014-03-05 23:35:37
【问题描述】:

我尝试在 getResources 模板块中使用 phpthumbof modx 插件作为 sn-p,如下面的代码所示。但它总是给我这个奇怪的图像及其版本和红色和紫色背景的文本“错误消息禁用”。

这是我的 sn-p 电话:

<img src="[[!phpthumbof? &input=`[[+tv.content__gallery__image]]` &options=`w=100&h100`]]" />

【问题讨论】:

  • 没有任何 modx 和/或 apache 日志?
  • 不,没有任何提示。抱歉,我无法提供更多信息。
  • 检查[[+tv.content__gallery__image]]的输出是否正确,没有sn-p?
  • 它是,我上面显示的 img 标签嵌套在一个带有图片的 URL 的锚点中,以便与 photoswipe 一起使用 - 它可以工作;)

标签: modx modx-revolution phpthumb


【解决方案1】:

在你的 sn-p 调用中使用 height 属性时出错,试试这个:

<img src="[[!phpthumbof? &input=`[[+tv.content__gallery__image]]` &options=`w=100&h=100`]]" />

接下来检查 imageMagick 是否在您的服务器上正常工作。该错误听起来像是缺少 ImageMagick 安装。

P.S 我还建议你看看 pThump extra 来替换 phpthumbof。它做同样的事情,但速度要快得多。

【讨论】:

    猜你喜欢
    • 2011-07-31
    • 2023-03-16
    • 2014-07-28
    • 2013-07-21
    • 1970-01-01
    • 2017-03-19
    • 2020-10-01
    • 2020-12-17
    • 1970-01-01
    相关资源
    最近更新 更多