I have an installation of Magento that integrates with WordPress using the Fishpig WordPress module.
As most WP users will know, when uploading an image WordPress will create resized versions referencing the dimensions set in Media Settings (e.g. Thumbnail Size, Medium Size and Large Size). It also creates images for each custom thumbnail size you specify (e.g. via functions.php).
It appears as though the Fishpig Magento module only uses the Thumbnail image size.
Unfortunately I need to be able to display different sizes of the same image (i.e. the resized versions that WordPress creates) on different pages. For example, the category page will display a small version, the post view page will display a larger version.
I was wondering if anyone has had any experience retrieving the other resized images via this module as I can’t find much documentation on it (or if it’s even possible with this module as I also couldn’t see any code that would suggest this functionality).
Greatly appreciate the help.
I had the same issue…I wanted to create a recent posts widget and Fishpig has that well documented, but they didn’t show an example of how to pull the featured image for the post.
But I found the answer in:
/app/design/frontend/base/default/template/wordpress/post/list/renderer/default.phtml
:You can change “getAvailableImage” to anyone of these to pull the different images sizes that wordpress produces:
Hope this helps!
Have try to do using below code. and working fine for me..
echo $featuredImage->getData(‘guid’);