Lovely error in Wordpress that exhibited itself as missing images in posts. Because I had been oiking around with permissions earlier, I assumed it was something related to this but nope.
I ended up using tail /var/logs/apache2/error.log and noticed the above error. The only reason I thought to look here was by directly typing the image url (...wp-admin/admin-ajax.php?mod=img&action=getProdImg&pid=1235&for=big&imgId=58) into the browser and noticing there was a 500 (internal server error).
Anyway a quick search on t'interweb and it seems that the library for this function - php5-gd is not installed by default in my Ubuntu Lamp installation and therefore the method is missing.
Used apt-get to install the library, restarted apache2 and away we went....