Skip to content

datalazyload 是否可以添加 srcprefix 和 srcset 配置? #3

Description

@yiminghe

@nanqiu

  • srcprefix: 用户配置图片前缀,通常来说,一个网站所引图片应该来自同一处,这样 html 中可以少输出一段前缀,脚本里加上;
  • srcset:用户配置在不同分辨率下要加载的图片地址或者在源路径基础上需要执行的正则替换,如:
{
    srcset: {
        'min-width:480px': 'http://...',
        'max-width:1200px': [/\d/, 'aa']
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions