Support » Plugin: Featured Image From URL » Link to Image is https:// on Product Page but // in Category

  • Resolved awideman


    Hi Marcel,

    Thanks for the helpful plugin!

    I have Featured Image From URL Premium installed and the external images have been working in categories up until recently (just checked today). Not sure why they stopped working. The external images still show up on product pages.

    I am using images from Amazon’s product API as the external images.

    Viewing the source of a product page, the src of the image is linked as follows: – works

    However, viewing the source of a category page, the src of the image is linked as follows
    // – doesn’t work.

    Sorry the images are a bit small. You can click them to enlarge.

    Please advise on how the links in the woocommerce loop for the category pages can be changed to specify “https://”


Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Marcel Jacques Machado


    Hi, @awideman.

    In the setting you can get the email for support. It’s faster.

    Anyway, the problem problem happened because you updated WooCommerce.

    WooCommerce is causing that once it’s replacing “https://” by “//” on shop.

    It shouldn’t be a problem. However your images are very specific because they can be accessed using “https” but not “http”.

    So I’ll give you two solutions:

    Solution 1:

    1) open

    2) replace the line 1910
    $wp_base = str_replace( array( ‘http://’, ‘https://’ ), ‘//’, get_home_url( null, ‘/’, ‘http’ ) );
    $wp_base = strpos($url, ‘fifu’) !== false ? $url : str_replace( array( ‘https://’, ‘http://’ ), ‘//’, $url );

    3) Save the file.

    PS.: WooCommerce updates can overwrite this change.

    Solution 2:

    Allow your images be accessed with “http” also.

    And that’s all. If it solves your issue, please consider to give the plugin a 5-star rating =)

    Solution 1 worked perfectly. Thanks Marcel!

    I am having exactly the same problem.
    I tired to to do solution 1 since I could not figure out how to do 2nd but I get this error;
    Parse error: syntax error, unexpected ‘:’, expecting ‘)’ in /home/projeksi/public_html/lambapro/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1911

    And below is the code on wp-core-functions.php after edit;
    function wc_is_external_resource( $url ) {

    $wp_base = strpos($url, ‘fifu’) !== false ? $url : str_replace( array( ‘https://’, ‘http://’ ), ‘//’, $url );

    I just copy and paste. Not sure what is the problem.
    Any help will be appreciated.

    Plugin Author Marcel Jacques Machado


    Hi, @bkntl.

    What’s your WordPress, WooCommerce and FIFU version?

    Hi Marcel,

    WordPress 4.9.1-tr_TR
    Woocommerce 3.2.6
    FIFU 1.7.2

    Hi @awideman,

    I get an php error for the same code that worked for you. Could you please let me know if you made any changes to make it work?

    Hey bkntl,

    I couldn't just copy and paste since the ’ character isn't the same as the ' character. Try replacing all the single quotes with '

    If that doesn’t work, here is the exact php I have – you could type it out:

    Let me know if it works!

    • This reply was modified 8 months, 1 week ago by  awideman.
    • This reply was modified 8 months, 1 week ago by  awideman.
    Plugin Author Marcel Jacques Machado


    Hi, @bknt.

    Your error shows something is wrong with the code you copied and pasted.

    Please try what @awideman suggestion.

    Hi @awideman,

    Thanks for the input. That resolved the code error.

    But unfortunately the solution is not working for me. http sources are still rewritten as https or made relative //.

    I am going hopeless on the issue. I loved the plugin. It works great on non-SSL site but I guess wont be good for me unless it adds a solid SSL support.

    Thanks again.

    Plugin Author Marcel Jacques Machado


    Hey, @bkntl.

    Do you have a link to your problem? I want to take a look on that to know why that didn’t work for you.

    Wideman is using the Premium version.

    Hi @marcelljm

    You can have a look at from

    I am using free version, but I dont know that makes a difference since you did not mention any configuration change at the back end of plugin.

    Plugin Author Marcel Jacques Machado


    Hi, @bkntl.

    I got this error on your site:


    Because your image is http only. So that’s not the same case of Wideman.

    If your are using https for that image, adjust for http.
    But if you already are using http, try to find what is forcing https usage. Another plugin?

    Here, I have tested
    with free FIFU version, without any change in WooCommerce files,
    and that works fine.

    Hi @marceljm,

    Images are on http and Fifu was working fine on my side as well before switching to SSL.
    Now something is rewriting the http to https. I thought it is woocommerce and your fix could fix it.
    Anyway I will check other plugins for error.
    Thanks for your time.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Link to Image is https:// on Product Page but // in Category’ is closed to new replies.