module Coco class Image < Coco::Component include Concerns::AcceptsOptions tag_name :img tag_attr :src, :alt accepts_option :lazy, from: [true, false], default: false, private: true before_render do set_tag_attr(:loading, "lazy") if option_value_equals?(:lazy, true) end end end