定制 roelvanhintum/craft-assetusage 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

roelvanhintum/craft-assetusage

最新稳定版本:4.1.3

Composer 安装命令:

composer require roelvanhintum/craft-assetusage

包简介

Adds a column to see which assets are used or unused.

README 文档

README

Adds a column to the assets overview to see which assets are used or unused. For Craft 4.

The "Usage" field shows all relations and the "Current Usage" field shows relations excluding revisions and deleted elements.

Setup

  • Go to admin/assets
  • Click the "sprocket" icon
  • Check the "Usage" or "Current Usage" column
  • Save
  • The assets table should now show a "Usage" or "Current Usage" column indicating usage

Settings

The setting values can be overridden from a PHP file within your project’s config/ folder, named assetusage.php.

The file just needs to return an array with the overridden values:

<?php

return [
    'includeRevisions' => false,
    'renderUsedByInAssetDetail' => true,
];

Support

  • Everything using an asset field or the relations table, including matrix fields
  • SuperTable

Does NOT support (assets not connected through relations table)

  • LinkIt
  • Redactor
  • ether/seo

Commandline usage

craft assetusage/default/delete-unused  # Deletes all unused assets.
craft assetusage/default/list-unused    # Lists all unused assets.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 32
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 32
  • Watchers: 6
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-13