Called by Sphinx.

        :returns: ImgurEmbedNode and ImgurJavaScriptNode instances with config values passed as arguments.
        :rtype: list

def run(self):
        """Called by Sphinx.

        :returns: ImgurEmbedNode and ImgurJavaScriptNode instances with config values passed as arguments.
        :rtype: list
        """
        # Get Imgur ID.
        imgur_id = self.arguments[0]
        if not RE_IMGUR_ID.match(imgur_id):
            raise ImgurError('Invalid Imgur ID specified. Must be 5-10 letters and numbers. Albums prefixed with "a/".')

        # Validate directive options.
        if imgur_id.startswith('a/') and self.options.get('target_largest', None):
            raise ImgurError('Imgur albums (whose covers are displayed) do not support :target_largest: option.')

        # Modify options.
        if self.options.get('width', '').isdigit():
            self.options['width'] += 'px'
        if self.options.get('height', '').isdigit():
            self.options['height'] += 'px'

        # Read from conf.py. Unset gallery/largest/page targets if :target: is set.
        if self.options.get('target', None):
            self.options.pop('target_gallery', None)
            self.options.pop('target_largest', None)
            self.options.pop('target_page', None)
        elif not any(self.options.get('target_' + i, None) for i in ('gallery', 'largest', 'page')):
            config = self.state.document.settings.env.config
            self.options.setdefault('target_gallery', config.imgur_target_default_gallery)
            self.options.setdefault('target_largest', config.imgur_target_default_largest)
            self.options.setdefault('target_page', config.imgur_target_default_page)

        return [ImgurImageNode(imgur_id, self.options)]