Class: MasterView::Directives::ImageTag
- Inherits:
-
MasterView::DirectiveBase
- Object
- MasterView::DirectiveBase
- MasterView::Directives::ImageTag
- Defined in:
- lib/masterview/directives/image_tag.rb
Overview
creates a image_tag. if path is specified in attr_value then it will be used exactly as listed, otherwise if attr_value is empty then masterview will attempt to find the public/images in the string and infer the path from what follows. otherwise it will simply use the src path. If width and/or height attr values are specified in the html then they will be appended to the output of the image tag helper. These are used instead of the size attribute because they are more flexible and a direct mapping. Other html attributes will be passed into image_tag options.
Constant Summary collapse
- IMAGE_SRC_EXTRACT_REGEX =
/public/images/(.*)/
MasterView::ConfigSettings.template_asset_base_ref_pattern[:images]