fix getImg for postgres and fix added configuration option