• Resolved imageDESIGN

    (@imagedesign)


    I would like to use an SVG image as the background for your plugin. I was able to add the SVG as the image, but when adding co-ordinates it does not show the SVG in the canvas area as it doesn’t set a height/width of the canvas. I can inspect and add a height/width and it shows and lets me draw on the canvas, but after saving it does not work on the front-end still.

    Is there anyway you can add a height/width option for the background size so that this can be incorporated so we can use SVG maps that are resolution independent?

    Thanks – I’ll be buying your plugin if you can add this support.

    https://wordpress.org/plugins/draw-attention/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Natalie MacLees

    (@nataliemac)

    Hi there! SVG doesn’t support the features of images that we’re using to display the front end functionality of our plugin to your site’s users.

    Handling SVG’s is so different from handling images, unfortunately we can’t just add support for SVG’s to this plugin, we would probably need to write it as a different plugin. Hopefully you can convert your SVG to a PNG image to get it working?

    Thread Starter imageDESIGN

    (@imagedesign)

    Hi Natalie,
    Thanks – I know it’s a bit different, but I’ve been playing around and the free plugin is 90% there already – especially after the update you just released. The only thing I had to do was manually set the height and width of the front-end img tag in the shortcode function in class-drawattention.php (I don’t think there is a way to detect this as SVG’s don’t always have an explicit height/width).

    Anyway, I just added this below line 399:

    $filetype =  wp_check_filetype($img_url);
    if( $filetype['ext'] == 'svg' ){
    	$img_width = 1024;
    	$img_height = 768;
    }

    So if you had a spot in the editor page to set a height & width for an SVG, it seems to work perfectly. I’ve been testing it out here if you’d like to see – http://crosslink.idhost.ca/sample-page/

    The reason it has to be SVG is because the client wants to be able to zoom in on the image and see the lot dimensions – when we use a png, the small numbers are too blurry to decipher

    Plugin Author NSquared

    (@croixhaug)

    Thanks for the info, we’ll take a look at this and do some testing with different browsers/devices!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SVG Support’ is closed to new replies.