Skip to content

Commit e579113

Browse files
author
imgix-git-robot
committed
chore(release): 4.0.0
# [4.0.0](v3.6.1...v4.0.0) (2022-10-03) * fix!: deprecate resizing the height param when maintaining aspect ratio ([9de24c2](9de24c2)) ### BREAKING CHANGES * removes the logic in ix-src responsible for resizing the h (height) parameter to maintain aspect ratio when building the srcset attribute. With the help of the imgix aspect ratio parameter, users can now achieve the same effect with the inclusion of the ar parameter. This should yield slightly better performance, code cleanliness, and bring the library more in line with the imgix API. Please note, the ar parameter should also be used with fit=crop to take effect [skip ci]
1 parent 9de24c2 commit e579113

4 files changed

Lines changed: 4 additions & 10 deletions

File tree

dist/imgix.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -540,12 +540,6 @@ var ImgixTag = (function () {
540540
var clonedParams = util.shallowClone(this.baseParams);
541541
clonedParams.w = targetWidth;
542542

543-
if (this.baseParams.w != null && this.baseParams.h != null) {
544-
clonedParams.h = Math.round(
545-
targetWidth * (this.baseParams.h / this.baseParams.w)
546-
);
547-
}
548-
549543
var url = this.baseUrlWithoutQuery + '?',
550544
val,
551545
params = [];
@@ -807,7 +801,7 @@ var ImgixTag = require('./ImgixTag.js'),
807801
util = require('./util.js'),
808802
defaultConfig = require('./defaultConfig');
809803

810-
var VERSION = '3.6.0';
804+
var VERSION = '3.6.1';
811805

812806
global.imgix = {
813807
init: function (opts) {

0 commit comments

Comments
 (0)