1. A method of selecting images for a markup language document, the method comprising: determining a pre-determined number, N, of images to display in the markup language document; encoding an instruction in the markup language document to be executed by one or more hardware-based processors to select N images for insertion into the markup language document; retrieving the N images from a group of images; and placing the N retrieved images in the markup language document, wherein selecting the N images includes: obtaining filtering criteria; identifying an image from all available images based on the filtering criteria; and adding the identified image to the group of images.