fix img src problem and add support for external images like s3upload field

This pull request fixes the image src problem differently from #15. External images like those uploaded to Amazon S3 with `s3upload_field` are now supported.