merges and image extension validation implemented