Beter handling of image creation.