• Resolved kr4ft3r

    (@kr4ft3r)


    Hello, thank you for making this plugin, it worked great so far.
    However now I have a problem which I am pretty sure didn’t happen before update.

    In my custom theme I am fetching some images this way:

    <img src="<?php bloginfo('url'); ?>/wp-content/uploads/2020/04/image.png" />

    This works well with default language, but after switching language the path gets replaced with this, resulting in missing images:
    https://websiteaddress.com/en//wp-content/uploads/2020/04/image.png

    Notice the double ‘/’, though that is not really the problem, the problem is image doesn’t exist on path which includes ‘/en/’.

    So while it is expected that bloginfo(‘url’) will add /en/ when English language is enabled, how do I get proper path to image linked from template file (considering image has no need for translation)? Also, this didn’t seem to happen before updates. I did look at documentation, apologies if I missed something.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Problem with bloginfo(‘url’) and image paths’ is closed to new replies.