Skip to content

Commit

Permalink
Merge pull request #3 from imgeng/feature/gh-2-add-support-for-force_…
Browse files Browse the repository at this point in the history
…download-and-outside-attribute-in-fit-method

Added support for force_download and outside
  • Loading branch information
jonarnes authored Sep 28, 2022
2 parents 2221fea + 931c279 commit 3c95943
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 253 deletions.
3 changes: 2 additions & 1 deletion dist/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ exports.OBJECT_TO_DIRECTIVES_MAP = {
keepMeta: "meta",
keep_meta: "meta",
noOptimization: "pass",
no_optimization: "pass"
no_optimization: "pass",
force_download: "dl"
};
function build_IE_url(src, directives, debug) {
var directives_string = build_IE_directives(directives, debug);
Expand Down
15 changes: 8 additions & 7 deletions dist/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export declare type IEFormat = "png" | "gif" | "jpg" | "bmp" | "webp" | "jp2" | "svg" | "mp4" | "jxr" | "avif";
export declare type IEFit = "stretch" | "box" | "letterbox" | "cropbox";
export declare type IEFormat = "png" | "gif" | "jpg" | "jpeg" | "bmp" | "webp" | "jp2" | "svg" | "mp4" | "jxr" | "avif";
export declare type IEFit = "stretch" | "box" | "letterbox" | "cropbox" | "outside";
export interface IEDirectives {
width?: number;
height?: number;
Expand All @@ -15,9 +15,10 @@ export interface IEDirectives {
compression?: number;
sharpness?: number;
rotate?: number;
inline?: boolean;
keep_meta?: boolean;
keepMeta?: boolean;
no_optimization?: boolean;
noOptimization?: boolean;
inline?: true;
keep_meta?: true;
keepMeta?: true;
no_optimization?: true;
noOptimization?: true;
force_download?: true;
}
Loading

0 comments on commit 3c95943

Please sign in to comment.