Cart Buy Licenses Contact Integrate into App Docs Support Login/Register
v 1.9.6
v 1.9.6
Overview Examples Docs Source

Static Image

Add an image to your survey - Image element

            Survey.defaultBootstrapCss.navigationButton = "btn btn-green";

                var json = {
   "elements": [
      "type": "image",
      "name": "banner",
      "imageLink": "",
      "imageWidth": "500px",
      "imageHeight": "300px"

                window.survey = new Survey.Model(json);
            survey.onComplete.add(function(sender) {
            document.querySelector('#surveyResult').textContent =
            "Result JSON:\n" + JSON.stringify(, null, 3);
            model: survey 

<!DOCTYPE html>
<html lang="en">
    <title>Add an image to your survey - Image element, jQuery Survey Library Example</title>

<meta name="viewport" content="width=device-width" />
    <script src=""></script>
    <script src="/DevBuilds/survey-jquery/survey.jquery.min.js"></script>
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="./index.css">

            <div id="surveyElement" style="display:inline-block;width:100%;">
    <div id="surveyResult"></div>

<script type="text/javascript" src="./index.js"></script>




Image fit mode: (default is 'contain')

var q = survey.getQuestionByName('banner');
q.imageFit = yourValue;

Content mode : (default is 'image')

var q = survey.getQuestionByName('banner');
q.contentMode = yourValue;