1. Does the location where the image files are saved actually exist (usually /tmp/motion)
2. Are you adding the 'port number' to the web browser (e.g. 192.168.2.5:8081)
3. Is the image size a multiple of 16?
You can also check the files with less /var/log/messages and less /var/log/syslog (you should go to the bottom of each page, the second might offer you an explanation of error messages).
Hope this helps (btw, I am only a motion user, no programming experience etc).