Refactor to use Desktop object
Use Post object
Deduce extension from URL
Handle more extensions than just 'jpg'