{"id":514118,"date":"2019-05-24T09:22:55","date_gmt":"2019-05-24T07:22:55","guid":{"rendered":"https:\/\/www.devoteam.com\/expert-view\/auto-resize-images-in-spotfire\/"},"modified":"2019-05-24T09:22:55","modified_gmt":"2019-05-24T07:22:55","slug":"auto-resize-images-in-spotfire","status":"publish","type":"expert-view","link":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/","title":{"rendered":"Auto-Resize Images in Spotfire"},"content":{"rendered":"<p><strong>In Spotfire, in a text area, it is possible to place pictures. And you can even choose to either place the picture as a background image or as a regular image. Great\u2026. but there is just one tiny issue. The pictures do not size with the box they are in, and do not size when switching to another screen resolution. So quite often I created pretty solutions with beautiful pictures in them, just to get a message from test users indicating that the logo I put in the solution was only half visible and had scroll bars.<\/strong><\/p>\n<h2><span style=\"font-weight: 400\">Workaround<\/span><\/h2>\n<p><span style=\"font-weight: 400\">So, time to find a workaround! And to be honest there is no 100% solution, but I did find a way to make it work better. Let\u2019s look at an example. In this solution I added a text area with a picture.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/auto-resize-images-in-spotfire-1-tt-width-1053-height-603-fill-0-crop-0-bgcolor-eeeeee-except_gif-1.png\" alt=\"\" class=\"aligncenter size-full wp-image-79676\" \/><\/p>\n<p><span style=\"font-weight: 400\">Notice that the picture is too high and not wide enough to fit into the text area. But even if you would resize the text area to fit the picture it would not resize properly on a mobile device or a laptop screen.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/auto-resize-images-in-spotfire-2-tt-width-701-height-256-fill-0-crop-0-bgcolor-eeeeee-except_gif-1.png\" alt=\"\" class=\"aligncenter size-full wp-image-79677\" \/><\/p>\n<p><span style=\"font-weight: 400\">Now, in the Spotfire text box, it is possible to use HTML. So what I will do is place a small snippet of HTML in my text box, that creates a table with one row, and one cell. And my image goes into this one cell. Initially (example above), the HTML in my text box looks like this. But now I will add my table stuff in, and it will look like this:<\/span><\/p>\n<div class=\"block-fullwidth-dark\">\n<p><span style=\"font-weight: 400\">&lt;table style=&#8221;width:100%&#8221;&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0&lt;tr&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0&lt;td&gt;&lt;IMG src=&#8221;fa44c17702444313a68ecc9bda6e30a5.png&#8221; border=0 width=&#8221;100%&#8221; height=&#8221;auto&#8221;&gt; &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0&lt;\/tr&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">&lt;\/table&gt;<\/span><\/p>\n<\/div>\n<h2><span style=\"font-weight: 400\">Result<\/span><\/h2>\n<p><span style=\"font-weight: 400\">This little bit of script will maximize the width of our picture and set the height to be relative to the width. The result looks like this:<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/auto-resize-images-in-spotfire-3-tt-width-1054-height-674-fill-0-crop-0-bgcolor-eeeeee-except_gif-1.png\" alt=\"\" class=\"aligncenter size-full wp-image-79678\" \/><\/p>\n<p><span style=\"font-weight: 400\">Of course we can set both width and height to auto but that will deform the picture. But at this point, we can resize the text area to correctly contain this picture, and it will more or less be consistent when opening the solution on another size screen:<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/auto-resize-images-in-spotfire-4-tt-width-903-height-730-fill-0-crop-0-bgcolor-eeeeee-except_gif-1.png\" alt=\"\" class=\"aligncenter size-full wp-image-79679\" \/><\/p>\n<p><span style=\"font-weight: 400\">All together, this solution can bring what you are looking for. No guarantees, but the chance is that it will be better than before.<\/span><\/p>\n<h3>Need help with Spotfire?<\/h3>\n<p>Devoteam has extensive knowledge in Data Visualization technologies such as Spotfire, based on years of experience in transforming well-known organizations to (well-known) data-driven organizations. If you need any additional help with Spotfire or any other data technology, reach out to me via my contact details in the author-section at the bottom of the page.<\/p>\n<div class=\"row-more clearfix\"><a href=\"https:\/\/nl.devoteam.com\/offer\/data-analytics-2\/\" class=\"bt-more\">More about Data &amp; Analytics<\/a><\/div>\n<h2>More about our TIBCO Spotfire Knowledge<\/h2>\n<p>Want to learn more about Spotfire through our client use cases, handy how-to articles and blog-posts? Click the button below to discover our knowledge.<\/p>\n<div class=\"row-more clearfix\"><a href=\"https:\/\/nl.devoteam.com\/en\/tibco-spotfire-knowledge\/\" class=\"bt-more\">Tibco Spotfire Knowledge<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In Spotfire, in a text area, it is possible to place pictures. And you can even choose to either place the picture as a background image or as a regular image. Great\u2026. but there is just one tiny issue. The pictures do not size with the box they are in, and do not size when [&hellip;]<\/p>\n","protected":false},"featured_media":349445,"template":"","categories":[],"tags":[2747],"industry":[],"class_list":["post-514118","expert-view","type-expert-view","status-publish","has-post-thumbnail","hentry","tag-netherlands-en-se"],"acf":[],"cards":"\n\t<div class=\"single-post-card\">\n\n\t\t<figure class=\"wp-block-post-featured-image\"><a href=\"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/\" target=\"_self\" ><img width=\"1920\" height=\"500\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco.png\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"Auto-Resize Images in Spotfire\" style=\"aspect-ratio:4\/3;width:100%;object-fit:cover;\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco.png 1920w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco-300x78.png 300w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco-1024x267.png 1024w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco-768x200.png 768w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco-1536x400.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/figure>\n\n\t\t\n\t\t<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-43282307 wp-block-group-is-layout-flex\">\n\t<p style=\"font-style:normal;font-weight:700\" class=\"has-link-color wp-elements-1 wp-block-lp-post-type has-text-color has-primary-color has-small-font-size\">Expert View<\/p>\n\n\t\t\n\t\t<h3 style=\"font-style:normal;font-weight:400\" class=\"wp-block-post-title has-base-font-size\"><a href=\"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/\" target=\"_self\" >Auto-Resize Images in Spotfire<\/a><\/h3><\/div>\n\t\t\n\t<\/div>\n\n","yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.4 (Yoast SEO v28.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Auto-Resize Images in Spotfire | Devoteam<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Auto-Resize Images in Spotfire\" \/>\n<meta property=\"og:description\" content=\"In Spotfire, in a text area, it is possible to place pictures. And you can even choose to either place the picture as a background image or as a regular image. Great\u2026. but there is just one tiny issue. The pictures do not size with the box they are in, and do not size when [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/\" \/>\n<meta property=\"og:site_name\" content=\"Devoteam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/expert-view\\\/auto-resize-images-in-spotfire\\\/\",\"url\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/expert-view\\\/auto-resize-images-in-spotfire\\\/\",\"name\":\"Auto-Resize Images in Spotfire | Devoteam\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/expert-view\\\/auto-resize-images-in-spotfire\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/expert-view\\\/auto-resize-images-in-spotfire\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/spotfire-auto-resize-images-devoteam-tibco.png\",\"datePublished\":\"2019-05-24T07:22:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/expert-view\\\/auto-resize-images-in-spotfire\\\/#breadcrumb\"},\"inLanguage\":\"en-SE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/devoteam.info\\\/en-se\\\/expert-view\\\/auto-resize-images-in-spotfire\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-SE\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/expert-view\\\/auto-resize-images-in-spotfire\\\/#primaryimage\",\"url\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/spotfire-auto-resize-images-devoteam-tibco.png\",\"contentUrl\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/spotfire-auto-resize-images-devoteam-tibco.png\",\"width\":1920,\"height\":500},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/expert-view\\\/auto-resize-images-in-spotfire\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Expert View\",\"item\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/expert-view\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Auto-Resize Images in Spotfire\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/#website\",\"url\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/\",\"name\":\"Devoteam\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/devoteam.info\\\/en-se\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-SE\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Auto-Resize Images in Spotfire | Devoteam","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/","og_locale":"en_US","og_type":"article","og_title":"Auto-Resize Images in Spotfire","og_description":"In Spotfire, in a text area, it is possible to place pictures. And you can even choose to either place the picture as a background image or as a regular image. Great\u2026. but there is just one tiny issue. The pictures do not size with the box they are in, and do not size when [&hellip;]","og_url":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/","og_site_name":"Devoteam","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/","url":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/","name":"Auto-Resize Images in Spotfire | Devoteam","isPartOf":{"@id":"https:\/\/devoteam.info\/en-se\/#website"},"primaryImageOfPage":{"@id":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/#primaryimage"},"image":{"@id":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/#primaryimage"},"thumbnailUrl":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco.png","datePublished":"2019-05-24T07:22:55+00:00","breadcrumb":{"@id":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/#breadcrumb"},"inLanguage":"en-SE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/"]}]},{"@type":"ImageObject","inLanguage":"en-SE","@id":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/#primaryimage","url":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco.png","contentUrl":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco.png","width":1920,"height":500},{"@type":"BreadcrumbList","@id":"https:\/\/devoteam.info\/en-se\/expert-view\/auto-resize-images-in-spotfire\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devoteam.info\/en-se\/"},{"@type":"ListItem","position":2,"name":"Expert View","item":"https:\/\/devoteam.info\/en-se\/expert-view\/"},{"@type":"ListItem","position":3,"name":"Auto-Resize Images in Spotfire"}]},{"@type":"WebSite","@id":"https:\/\/devoteam.info\/en-se\/#website","url":"https:\/\/devoteam.info\/en-se\/","name":"Devoteam","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devoteam.info\/en-se\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-SE"}]}},"uagb_featured_image_src":{"full":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco.png",1920,500,false],"thumbnail":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco-150x150.png",150,150,true],"medium":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco-300x78.png",300,78,true],"medium_large":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco-768x200.png",768,200,true],"large":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco-1024x267.png",1024,267,true],"1536x1536":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco-1536x400.png",1536,400,true],"2048x2048":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/12\/spotfire-auto-resize-images-devoteam-tibco.png",1920,500,false]},"uagb_author_info":{"display_name":"group.it.system","author_link":"https:\/\/devoteam.info\/en-se\/author\/"},"uagb_comment_info":0,"uagb_excerpt":"In Spotfire, in a text area, it is possible to place pictures. And you can even choose to either place the picture as a background image or as a regular image. Great\u2026. but there is just one tiny issue. The pictures do not size with the box they are in, and do not size when&hellip;","_links":{"self":[{"href":"https:\/\/devoteam.info\/en-se\/wp-json\/wp\/v2\/expert-view\/514118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devoteam.info\/en-se\/wp-json\/wp\/v2\/expert-view"}],"about":[{"href":"https:\/\/devoteam.info\/en-se\/wp-json\/wp\/v2\/types\/expert-view"}],"version-history":[{"count":0,"href":"https:\/\/devoteam.info\/en-se\/wp-json\/wp\/v2\/expert-view\/514118\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devoteam.info\/en-se\/wp-json\/wp\/v2\/media\/349445"}],"wp:attachment":[{"href":"https:\/\/devoteam.info\/en-se\/wp-json\/wp\/v2\/media?parent=514118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devoteam.info\/en-se\/wp-json\/wp\/v2\/categories?post=514118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devoteam.info\/en-se\/wp-json\/wp\/v2\/tags?post=514118"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/devoteam.info\/en-se\/wp-json\/wp\/v2\/industry?post=514118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}