Add image component
Handle more edge cases