Replaced usage of deprecated class
Removed the pop-up to conform to Moodle standards
Corrected error messages regarding width and height for the image element
Only call definition_after_data when we are editing an element so that we know data exists
Set default width and height for the image element