Sort images within a story on priority CASE statement.