PHPackages                             newism/craftcms-revved-url - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. newism/craftcms-revved-url

ActiveCraft-plugin[File &amp; Storage](/categories/file-storage)

newism/craftcms-revved-url
==========================

Rev CraftCMS asset urls with date modified timestamps

1.0.3(9y ago)7142PHP

Since Feb 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/newism/craftcms-revved-url)[ Packagist](https://packagist.org/packages/newism/craftcms-revved-url)[ RSS](/packages/newism-craftcms-revved-url/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

NSM Revved URL plugin for Craft CMS
===================================

[](#nsm-revved-url-plugin-for-craft-cms)

This Twig function revs asset urls with the date modified timestamp

Installation
------------

[](#installation)

To install NSM Revved URL, follow these steps:

1. Download &amp; unzip the file and place the `nsmrevvedurl` directory into your `craft/plugins` directory
2. -OR- do a `git clone https://github.com/Newism/nsmrevvedurl.git` directly into your `craft/plugins` folder. You can then update it with `git pull`
3. -OR- install with Composer via `composer require nsm/craftcms-revved-url`
4. Install plugin in the Craft Control Panel under Settings &gt; Plugins
5. The plugin folder should be named `nsmrevvedurl` for Craft to see it. GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads.

NSM Revved URL works on Craft 2.4.x and Craft 2.5.x.

Usage
-----

[](#usage)

### Native Assets

[](#native-assets)

Its simple… just call the function and pass the asset and an optional transform

```
nsm_rev_asset_url(asset, transform)

```

Before revving:

```
http://example.com/uploads/images/_572x430_crop_center-center_80/James-Ellis_elevation-render-1.jpg

```

After revving:

```
http://example.com/uploads/images/_572x430_crop_center-center_80/James-Ellis_elevation-render-1.1485302752.jpg

```

### Imager Support

[](#imager-support)

NSM Revved URL supports [Imager](https://github.com/aelvan/Imager-Craft) transforms and `craft.imager.srcset()`by wrapping the Imager plugin functions.

#### Returned a revved URL

[](#returned-a-revved-url)

```
{{ nsm_rev_imager_url(newsImage, transform) }}

```

#### Returned a revved Imager model

[](#returned-a-revved-imager-model)

Caution this replaces the original `url` property

```
{% set revvedImagerAsset = nsm_rev_imager_asset(newsImage, transform) }}

{# output the revved URL #}
{{ revvedImagerAsset.url }}

```

#### Returned a revved Imager model for use with `craft.imager.srcset()`

[](#returned-a-revved-imager-model-for-use-with-craftimagersrcset)

```
{% set revvedImagerAsset = nsm_rev_imager_asset(newsImage, [transform1, transform2]) }}
{{ craft.imager.srcset(revvedImagerAsset) }}

```

Updating your server config
---------------------------

[](#updating-your-server-config)

This plugin doesn't actually change the the filename on the server. You'll need to implement rewrite rules on your server.

#### Apache

[](#apache)

See:

```
# ----------------------------------------------------------------------
# | Filename-based cache busting                                       |
# ----------------------------------------------------------------------

# If you're not using a build process to manage your filename version
# revving, you might want to consider enabling the following directives
# to route all requests such as `/style.12345.css` to `/style.css`.
#
# To understand why this is important and even a better solution than
# using something like `*.css?v231`, please see:
# http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/

#
#     RewriteEngine On
#     RewriteCond %{REQUEST_FILENAME} !-f
#     RewriteRule ^(.+)\.(\d+)\.(bmp|css|cur|gif|ico|jpe?g|js|png|svgz?|webp|webmanifest)$ $1.$3 [L]
#

```

#### NGINX

[](#nginx)

See:

```
# Built-in filename-based cache busting

# This will route all requests for /css/style.20120716.css to /css/style.css
# Read also this: github.com/h5bp/html5-boilerplate/wiki/cachebusting
# This is not included by default, because it'd be better if you use the build
# script to manage the file names.
location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif)$ {
  try_files $uri $1.$2;
}

```

[![](https://camo.githubusercontent.com/c03fd457cd8200454086f64bc5b6efa93d53368f9a8af669fc6d418f917bab9f/687474703a2f2f6e657769736d2e636f6d2e61752f75706c6f6164732f636f6e74656e742f6e657769736d2d6c6f676f2e706e67)](http://newism.com.au/)

Brought to you by [Leevi Graham](http://newism.com.au)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

4

Last Release

3346d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54c91398084bc17848b56c2dc015c3c257fb5871f246f7296a99f1ceba072e4f?d=identicon)[leevigraham](/maintainers/leevigraham)

---

Top Contributors

[![leevigraham](https://avatars.githubusercontent.com/u/25124?v=4)](https://github.com/leevigraham "leevigraham (20 commits)")

---

Tags

craftcraft-plugincraftcmscraftcms-plugin

### Embed Badge

![Health badge](/badges/newism-craftcms-revved-url/health.svg)

```
[![Health](https://phpackages.com/badges/newism-craftcms-revved-url/health.svg)](https://phpackages.com/packages/newism-craftcms-revved-url)
```

###  Alternatives

[humanmade/s3-uploads

WordPress plugin to store uploads on S3

2.1k2.4M9](/packages/humanmade-s3-uploads)[deliciousbrains/wp-amazon-s3-and-cloudfront

Automatically copies media uploads to a storage provider's bucket for delivery. Optionally configure a CDN for even faster delivery.

310213.3k1](/packages/deliciousbrains-wp-amazon-s3-and-cloudfront)[humanmade/network-media-library

Network Media Library provides a central media library that's shared across all sites on the Multisite network.

29644.8k](/packages/humanmade-network-media-library)[humanmade/amf-wordpress

Use another WordPress site as source for your media library.

52175.7k2](/packages/humanmade-amf-wordpress)[fusic/filebinder

Simple file attachment plugin for CakePHP

7230.1k](/packages/fusic-filebinder)[edwardspec/mediawiki-aws-s3

Allows MediaWiki to use Amazon S3 to store uploaded files.

4913.2k](/packages/edwardspec-mediawiki-aws-s3)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
