We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47717
    • 144 Posts
    Hi,

    I want to fix the width and height of image+ with Migx, so that if one crops the image, it has a fixed ratio with Image+

    It says here to input those values in the "config" of MIGX : http://jako.github.io/ImagePlus/examples/#examples
    {
    "targetWidth":"",
    "targetHeight":"",
    "targetRatio":"",
    "thumbnailWidth":"",
    "allowAltTag":""
    }

    I tried different things, but I do not find where/how to put this in the MIGX form.

    [{"caption":"home_banner", "fields": [
    {"field":"naam","caption":"naam"},
    {"field":"beschrijving","caption":"beschrijving","inputTVtype":"richtext"}, {"field":"afbeelding","caption":"afbeelding","inputTVtype":"imageplus"}, {"field":"image_option","caption":"image_option","inputTVtype":"option","inputOptionValues":"optie1||optie2"}
    ]}
    ]


    THANKS !

    This question has been answered by sriananda. See the first response.

      • 4172
      • 5,888 Posts
      define your configs with the MIGX-configurator - CMP
      there is a field, for each field, where you can put configs in.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
      • discuss.answer
        • 47717
        • 144 Posts
        Quote from: Bruno17 at Jan 13, 2016, 10:22 AM
        define your configs with the MIGX-configurator - CMP
        there is a field, for each field, where you can put configs in.

        I stumbled upon this answer from Bruno which worked like a charm :

        Quote from: Bruno17 at Dec 15, 2015, 09:01 AM
        try

        ,"configs":"{\"targetRatio\":\"1\"}"

        So now I can input all configs for Image+ directly into the MIGX form tab, but I just have to add "backslashes" in that code \" so the json does not get confused...

        "configs":"{ "targetWidth":"", "targetHeight":"", "targetRatio":"", "thumbnailWidth":"", "allowAltTag":"" }"


        So my working code is now like this:

        {"field":"afbeelding","caption":"afbeelding","inputTVtype":"imageplus","configs":"{\"targetRatio\":\"1.6\"}"}



        Thanks ! smiley [ed. note: sriananda last edited this post 10 years, 9 months ago.]