Logic for images or text