alchemy-media 0.7.5 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.7.6 (2023-10-05)
2
+
3
+ * Let `Media#imageUrl()` helper handle image instructions that start with a slash
4
+
1
5
  ## 0.7.5 (2023-07-28)
2
6
 
3
7
  * Remove old reference to `chimera/mediafield` script
@@ -248,7 +248,7 @@ Media.setMethod(function fileAnchor(file_id, options) {
248
248
  *
249
249
  * @author Jelle De Loecker <jelle@develry.be>
250
250
  * @since 0.2.0
251
- * @version 0.7.2
251
+ * @version 0.7.6
252
252
  *
253
253
  * @param {String} image_id
254
254
  *
@@ -273,7 +273,7 @@ Media.setMethod(function imageUrl(image_id, options) {
273
273
  }
274
274
 
275
275
  url = this.parseURL(this.view.helpers.Router.routeUrl(routeName, {id: image_id}));
276
- } else if (typeof image_id == 'string' && image_id.indexOf('http') === 0) {
276
+ } else if (typeof image_id == 'string' && (image_id.indexOf('http') === 0 || image_id[0] == '/')) {
277
277
  url = this.parseURL(image_id);
278
278
  } else if (image_id) {
279
279
  url = this.parseURL('/media/static/' + image_id);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "alchemy-media",
3
3
  "description": "The media plugin for Alchemy",
4
- "version": "0.7.5",
4
+ "version": "0.7.6",
5
5
  "repository": {
6
6
  "type" : "git",
7
7
  "url" : "https://github.com/11ways/alchemy-media.git"