All the good tutorials that I know of relate to using php to store images in MySQL. If you download a copy of the php manual you will very quickly be able to turn the code for MySQL to code for PgSQL.
Examples -
mysql_query() => pg_query()
mysql_fetch_array() => pg_fetch_array()
But as both ultraslacker & csn said above - you shouldn't be storing the images in a db. It is inefficient and it is much better to store the image path/name in the db, and store the image in the filesystem.