WP Manifestindependent plugin directory
manifest / media / wp-unique-media

WP Unique Media WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

WordPress plugin to prevent duplicate files from being uploaded.

★ 22stars
133release downloads
≈10active sites
0.2.0latest · 3 years ago

Install

Download wp-unique-media.zip From the 0.2.0 release on GitHub, May 4, 2023

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/mcguffin/wp-unique-media/releases/download/0.2.0/wp-unique-media.zip
Updates itself. It ships its own updater (Update URI header), so new versions appear under Dashboard → Updates.

WordPress plugin to prevent duplicate files from being uploaded.

This is a shut-the-fork-up-and-work plugin. This means, if someone tries to upload a duplicate attachment to the media library, the existing file is silently getting selected.

If you need a more verbose approach, please use Media Deduper by Cornershop Creative instead. Both plugins use the same hashing and storage techniques, so either can be an alternative to the other.

Tested with

Installation

Production (Stand-Alone)

  • Head over to releases
  • Download 'wp-unique-media.zip'
  • Upload and activate it like any other WordPress plugin
  • AutoUpdate will run as long as the plugin is active

Development

  • cd into your plugin directory
  • $ git clone git@github.com:mcguffin/wp-unique-media.git
  • $ cd wp-unique-media
  • $ npm install
  • $ gulp

Development status

The plugin is currently in alpha stadium. Please don't expect it to be stable or doing no damage. Issues and Pull requests are highly appreciated.

WP-Cron

Media hash values are generated during upload or automatically through a cronjob. Please wait a few minutes after the activation, to let wp-cron do its work.

WPCLI

For the impatient (like me) there is a wp-cli command for initial hash generation ...

$ wp unique-media-hash

... and hashing a single attachment:

$ wp unique-media-hash --attachment_id=123

Roadmap:

0.2.0

  • [x] Remove autoupdater
  • [ ] Test with polylang translate media option enabled
  • [ ] boilerplate 2

0.3.0

  • [ ] Tool: Replace Duplicates (in wp-content, blocks, widgets, acf image fields, acf gallery fields, known settings)

1.0.0

  • [ ] release at WP.org

Releases

5 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
0.2.0 latest
May 4, 2023 3 years ago
wp-unique-media.zip
62
Jun 14, 2020 6 years ago
wp-unique-media.zip
60
Jun 14, 2020 6 years ago
wp-unique-media.zip
8
Nov 18, 2018 7 years ago
wp-unique-media.zip
1
Nov 18, 2018 7 years ago
wp-unique-media.zip
2

Active-site estimate ≈10 comes from the median of recent superseded releases. Method.

A grade

Security

WP Unique Media 0.2.0 · audited by WP Registry

No security issues found.

Audited release
0.2.0
Findings
none
Worst severity
—
Content hash
24bd696e0437e9f3678d4394…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.