web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Web resource to change size of image is small

(0) ShareShare
ReportReport
Posted on by

I have got an HTML file to show an image but the box size is small. How can I change the size of the box?

<html>
<head>
<style>
</style>
<script text="text/javascript">
function load()
{
document.getElementById("customerAssetImage").src = imageUrl;
}
</script>
</head>
<body onload="load()" style="word-wrap: break-word;">
<img src="nothing.jpg" id="customerAssetImage" name="customerAssetImage" height="402" width="402"/>
</body>
</html>
731824.Capture.PNG
Is there a way I can change the size of this box?
Any help is much appreciated.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    In CRM form editor, go to webresource properties, then under formatting tab you will see Row layout - Number of rows, adjust that.

    dynamicscrmpros.com/.../CRM-Forms-14.png

  • Community Member Profile Picture
    on at

    Thanks for the solution. it worked for me fine.

    For everyone, facing this problem, below is my code

    <html>

    <head>

       <style>

       </style>

       <script text="text/javascript">

           function load()

           {

               var dyanmicsImageUrl = window.parent.Xrm.Page.context.getClientUrl() + "/image/download.aspx?attribute=entityimage&entity=" + window.parent.Xrm.Page.data.entity.getEntityName() + "&id="+window.parent.Xrm.Page.data.entity.getId() + "&Timestamp="+ new Date().getTime();

               document.getElementById("customerAssetImage").src = dyanmicsImageUrl;

           }

       </script>

    </head>

    <body onload="load()" style='word-wrap: break-word;'>

      <img src="nothing.jpg" id="customerAssetImage" name="customerAssetImage" height="auto" width="100%" style='margin-left: auto; margin-right: auto; display:block; width:90%; padding-top:5%'/>

    </body>

    </html>

    it looks like this.

    007686416.Capture.PNG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans