Skip to content

Instantly share code, notes, and snippets.

@sandermangel
Created July 7, 2015 12:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandermangel/d112f49a014f24eebcdb to your computer and use it in GitHub Desktop.
Save sandermangel/d112f49a014f24eebcdb to your computer and use it in GitHub Desktop.
Get resized product image without loading product
$image = Mage::getResourceModel('catalog/product')->getAttributeRawValue([product_id], 'thumbnail', [store_id]);
$product = new Mage_Catalog_Model_Product;
$imageUrl = (string)Mage::helper('catalog/image')->init($product, 'thumbnail', $image)->resize(100, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment