Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 21st, 2022, 11:29 AM
rkury14 rkury14 is offline
Regular Contributor
 
Join Date: May 2014
Location: Tempe, AZ
Posts: 56
Default Need help scaling images from url link

Hi,

I have a "CreateResource" rule here that seems to work on a URL Link with https://, but the images are coming in at different sizes. Too small or too big.
How can I add a scaling code into the rule to make the images uniform?

Here is the js rule.

var baseName = Field("URL");

var extensions = [".tif", "gif", ".png", ".jpg"];
for (var i in extensions)

{ var pic = CreateResource(Field ("URL") + extensions[i], + "graphic", true);
if (pic.exists)
return pic;}

Print("http://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/thumbs-up" + Field ("URL") + " not found.");
return CreateResource(Field ("URL"))
return NullResource();

Thank you,
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.