Skip to content

Commit

Permalink
chore(release): 4.0.0
Browse files Browse the repository at this point in the history
# [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]
  • Loading branch information
imgix-git-robot committed Oct 3, 2022
1 parent 9de24c2 commit e579113
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions dist/imgix.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,6 @@ var ImgixTag = (function () {
var clonedParams = util.shallowClone(this.baseParams);
clonedParams.w = targetWidth;

if (this.baseParams.w != null && this.baseParams.h != null) {
clonedParams.h = Math.round(
targetWidth * (this.baseParams.h / this.baseParams.w)
);
}

var url = this.baseUrlWithoutQuery + '?',
val,
params = [];
Expand Down Expand Up @@ -807,7 +801,7 @@ var ImgixTag = require('./ImgixTag.js'),
util = require('./util.js'),
defaultConfig = require('./defaultConfig');

var VERSION = '3.6.0';
var VERSION = '3.6.1';

global.imgix = {
init: function (opts) {
Expand Down
Loading

0 comments on commit e579113

Please sign in to comment.