Support

Account

Home Forums Feature Requests File field type: Option to return SVG as code Reply To: File field type: Option to return SVG as code

  • I’ve found an(other) solution with Curl.

    <?php $test = get_field('logo'); ?>
    <a href="<?php the_field('link'); ?>" target="_blank">
    <?php $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $test);
    curl_setopt($handle, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1');
    curl_exec($handle);
    curl_close($handle); ?>   
    </a>

    My SVG files are loads inline now.
    Hope this solution could helps someone.