[ticket/12535] Make <a> adjust to the image width

PHPBB3-12535