gpt4 book ai didi

php - 从缓存中获取图像 MAGENTO

转载 作者:搜寻专家 更新时间:2023-10-31 21:02:32 24 4
gpt4 key购买 nike

我有以下情况。

它的图片将近 10 兆字节,而执行必要的例程最多可达 4 兆字节。

我可以得到如下图片:

$imgsProdMagento = $product->getMediaGalleryImages();
foreach ($imgsProdMagento as $imgProdMagento) {
var_dump($imgProdMagento);
}

它返回给我 10 兆字节的图片,查看前端可能会看到图像缓存要小得多,因为我要获取它?

我试过如下,但它只返回一个标记的图像,不返回 URL。

Mage::helper('catalog/image')->init($product, 'image');

我需要从缓存中获取产品所有图片的 url。

最佳答案

试试这个 Get full cached path of product relative images Magento

Mage::helper('catalog/image')->init($product->getProduct(), 'image', $_image->getFile())->resize(2000);

关于php - 从缓存中获取图像 MAGENTO,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39230168/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com