Support » Fixing WordPress » Image in Header / media in header not showing on some themes

  • Resolved Dariusz

    (@idarek)


    Hello All,
    I am facing strange issue with Image placed in Header of the page not showing leaving only background colour. On the provided website I am using refur theme and firstly though that is related to the theme, then to some cache, web browser, plugins or hosting type, but not as checked in a different scenario with similar issues.

    Tested with themes:
    – Velux
    – Uptown Style
    – Chaplin
    – Business Epic
    – Primer
    and many more with similar results

    But for example theme Consultup is working fine. Posibble header image is implemented slightly different than above.

    Its strange that is affecting soo many themes.

    Notice this on some point this year and struggle to fix that, as when you View Source of the page you see the image link without an issue, also no 404 pages reported etc.

    • This topic was modified 4 months ago by Dariusz.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • dragan17ostojic

    (@dragan17ostojic)

    Hi Dariusz,

    Looks like some kind of compatibility issue.

    You can try to deactivate Autoptimize plugin, maybe this plugin breaks the header image. If not try to deactivate all plugins, and then activate one by one until you find which one breaks the header image.

    Or you can try to downgrade the PHP version to exclude themes PHP compatibility issues.

    Let me know if you have any other questions or concerns.

    Dragan

    Optimizing Matters

    (@optimizingmatters)

    pro-tip; you can disable Autoptimize on a per-request basis by adding ?ao_noptimize=1 to the URL.

    if the problem is not there at that point, some autoptimize (re-)configuration might be needed to fix this. there are troubleshooting tips and info on how to exclude in the AO FAQ.

    hope this helps debugging,
    frank (ao dev)

    Dariusz

    (@idarek)

    Thanks for the response.
    Installed fresh WordPress and noticed that image is working. Yep, it’s strange.

    PHP is in 7.4 version. Will be playing with remaining plugins to see where compatibility issue stand, but can confirm that is not strictly WordPress.

    @optimizingmatters ?ao_noptimize=1 not making any difference, but I got also other plugins there, hence will go back to the drawing board and start one-by-one, hope will find the cause.

    Dariusz

    (@idarek)

    Not only I turn off all plugins, but I also remove all of them (apart of Defender). Then I clean the database from unused tables.

    I removed all the cache’s but still nothing. I think this is maybe it’s still somewhere deep in wp_options table.

    So I search for my Header Image in SQL database.

    Started with theme_mods_ and removed all related to plugins that I am not using along with the current.

    Reinstalled WordPress on top of current and still header image not showing.

    Really annoying!

    I think because the site is not big, I will re-set the database in full and re-set the whole website, restoring only theme and wp_posts and will see if that will sort the issue.

    Dariusz

    (@idarek)

    After investigating on two different hostings found where the issue stand.

    The theme (this and others) uses opacity value dynamically set through customizer.

    Local environment of the website is Polish and it convert value of 50 to 0,5 which is incorrect for CSS as CSS require dot 0.5 not comma 0,5.

    Thats due to changes in PHP 7.3.17+ hence it look like themes are not compatible with that feature or doesn’t have implemented options to correctly interpret numbers.

    Will need to look workaround rather than relaying on modifying themes.

    Dariusz

    (@idarek)

    For anybody interested.

    Sorted above issue by adding setlocale(LC_NUMERIC, 'en_US.UTF-8');.

    There are couple methods to add that. To theme, child theme or by simply creating a mu-plugin (Must Use). mu-plugin looks more universal hence I create above, saved into php file and placed in mu-plugins folder in wp-content.

    <?php
      setlocale(LC_NUMERIC, 'en_US.UTF-8');
    ?>

    This sort issue not only with this theme but also others.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.