Extended Helpers

- (Void) image_tag(path, params = {})

Override the built-in image-tag helper in order to support additional features.

  • Automatic target-specific images. Note that this only works on local files, and only if enabled with the option :target_magic_images.
  • Target and feature dependent images using the params hash.
  • Absolute paths, which Middleman sometimes bungles.

Note that in addition to the options described below, middleman-targets inherits all of the built-in option parameters as well.

Parameters:

  • path (String)

    The path to the image file.

  • params (Hash) (defaults to: {})

    Optional parameters to pass to the helper.

Options Hash (params):

  • :target (String, Symbol)

    This image tag will only be applied if the current target is target.

  • :feature (String, Symbol)

    This image tag will only be applied if the current target enables the feature feature.

Returns:

  • (Void)