Attempt at creating preview images- not working