@@ -182,43 +182,30 @@ describe("URL generation", function () {
182182 expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:h-300,w-400:rndm_trnsf-abcd/test_path.jpg` ) ;
183183 } ) ;
184184
185- it ( 'overlayImage ' , function ( ) {
185+ it ( 'Overlay image ' , function ( ) {
186186 const url = imagekit . url ( {
187187 path : "/test_path.jpg" ,
188188 transformation : [ {
189189 "height" : "300" ,
190190 "width" : "400" ,
191- overlayImage : "overlay.jpg"
191+ "raw" : "l-image,i- overlay.jpg,w-100,b-10_CDDC39,l-end "
192192 } ]
193193 } )
194194
195- expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:h-300,w-400,oi- overlay.jpg/test_path.jpg` ) ;
195+ expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:h-300,w-400,l-image,i- overlay.jpg,w-100,b-10_CDDC39,l-end /test_path.jpg` ) ;
196196 } ) ;
197197
198- it ( 'overlayImage with slash in path' , function ( ) {
198+ it ( 'Overlay image with slash in path' , function ( ) {
199199 const url = imagekit . url ( {
200200 path : "/test_path.jpg" ,
201201 transformation : [ {
202202 "height" : "300" ,
203203 "width" : "400" ,
204- overlayImage : "/path/to/overlay.jpg"
204+ "raw" : "l-image,i- /path/to/overlay.jpg,w-100,b-10_CDDC39,l-end "
205205 } ]
206206 } )
207207
208- expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:h-300,w-400,oi-path@@to@@overlay.jpg/test_path.jpg` ) ;
209- } ) ;
210-
211- it ( 'overlayX' , function ( ) {
212- const url = imagekit . url ( {
213- path : "/test_path.jpg" ,
214- transformation : [ {
215- "height" : "300" ,
216- "width" : "400" ,
217- overlayX : 10
218- } ]
219- } )
220-
221- expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:h-300,w-400,ox-10/test_path.jpg` ) ;
208+ expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:h-300,w-400,l-image,i-/path/to/overlay.jpg,w-100,b-10_CDDC39,l-end/test_path.jpg` ) ;
222209 } ) ;
223210
224211 it ( 'Border' , function ( ) {
@@ -234,7 +221,7 @@ describe("URL generation", function () {
234221 expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:h-300,w-400,b-20_FF0000/test_path.jpg` ) ;
235222 } ) ;
236223
237- it ( 'transformation with empty key and empty value' , function ( ) {
224+ it ( 'transformation with empty key and empty value' , function ( ) {
238225 const url = imagekit . url ( {
239226 path : "/test_path.jpg" ,
240227 transformation : [ {
@@ -263,11 +250,11 @@ describe("URL generation", function () {
263250 const url = imagekit . url ( {
264251 path : "/test_path.jpg" ,
265252 transformation : [ {
266- overlayImage : ""
253+ effectShadow : ""
267254 } ]
268255 } )
269256
270- expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:oi -/test_path.jpg` ) ;
257+ expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:e-shadow -/test_path.jpg` ) ;
271258 } ) ;
272259
273260 it ( 'transformation with - value' , function ( ) {
@@ -299,32 +286,6 @@ describe("URL generation", function () {
299286 rotation : 90 ,
300287 blur : 10 ,
301288 named : "some_name" ,
302- overlayX : 35 ,
303- overlayY : 35 ,
304- overlayFocus : "bottom" ,
305- overlayHeight : 20 ,
306- overlayWidth : 20 ,
307- overlayImage : "/folder/file.jpg" , // leading slash case
308- overlayImageTrim : false ,
309- overlayImageAspectRatio : "4:3" ,
310- overlayImageBackground : "0F0F0F" ,
311- overlayImageBorder : "10_0F0F0F" ,
312- overlayImageDPR : 2 ,
313- overlayImageQuality : 50 ,
314- overlayImageCropping : "force" ,
315- overlayText : "two words" ,
316- overlayTextFontSize : 20 ,
317- overlayTextFontFamily : "Open Sans" ,
318- overlayTextColor : "00FFFF" ,
319- overlayTextTransparency : 5 ,
320- overlayTextTypography : "b" ,
321- overlayBackground : "00AAFF55" ,
322- overlayTextEncoded : "b3ZlcmxheSBtYWRlIGVhc3k%3D" ,
323- overlayTextWidth : 50 ,
324- overlayTextBackground : "00AAFF55" ,
325- overlayTextPadding : 40 ,
326- overlayTextInnerAlignment : "left" ,
327- overlayRadius : 10 ,
328289 progressive : true ,
329290 lossless : true ,
330291 trim : 5 ,
@@ -336,12 +297,14 @@ describe("URL generation", function () {
336297 effectUSM : "2-2-0.8-0.024" ,
337298 effectContrast : true ,
338299 effectGray : true ,
300+ effectShadow : 'e-shadow-bl-15_st-40_x-10_y-N5' ,
301+ effectGradient : 'from-red_to-white' ,
339302 original : true ,
340303 raw : "h-200,w-300,l-image,i-logo.png,l-end"
341304 } ]
342305 } )
343306
344- expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:h-300,w-400,ar-4-3,q-40,c-force,cm-extract,fo-left,f-jpeg,r-50,bg-A94D34,b-5-A94D34,rt-90,bl-10,n-some_name,ox-35,oy-35,ofo-bottom,oh-20,ow-20,oi-folder@@file.jpg,oit-false,oiar-4:3,oibg-0F0F0F,oib-10_0F0F0F,oidpr-2,oiq-50,oic-force,ot-two%20words,ots-20,otf-Open%20Sans,otc-00FFFF,oa-5,ott-b,obg-00AAFF55,ote-b3ZlcmxheSBtYWRlIGVhc3k%3D,otw-50,otbg-00AAFF55,otp-40,otia-left,or-10, pr-true,lo-true,t-5,md-true,cp-true,di-folder@@file.jpg,dpr-3,e-sharpen-10,e-usm-2-2-0.8-0.024,e-contrast-true,e-grayscale-true,orig-true,h-200,w-300,l-image,i-logo.png,l-end/test_path.jpg` ) ;
307+ expect ( url ) . equal ( `https://ik.imagekit.io/test_url_endpoint/tr:h-300,w-400,ar-4-3,q-40,c-force,cm-extract,fo-left,f-jpeg,r-50,bg-A94D34,b-5-A94D34,rt-90,bl-10,n-some_name,pr-true,lo-true,t-5,md-true,cp-true,di-folder@@file.jpg,dpr-3,e-sharpen-10,e-usm-2-2-0.8-0.024,e-contrast-true,e-grayscale-true,e-shadow-e-shadow-bl-15_st-40_x-10_y-N5,e-gradient-from-red_to-white ,orig-true,h-200,w-300,l-image,i-logo.png,l-end/test_path.jpg` ) ;
345308 } ) ;
346309} ) ;
347310
0 commit comments