Autoptimize: Full Screen Header / Background Images

Posted in: Newsmag
Post count: 12

Hi there,

I’m using Autoptimize to try and improve the speed performance of my site. But when I choose to ‘Optimise Javascript Code’, the Full Screen Header (on the menu as per the Fashion demo here) and background images (on other pages like this) no longer appear except when logged in as an administrator.

They do appear when I uncheck the ‘Optimise Javascript Code’. But this has a negative impact on page performance.

I assume it has something to do with the td-backstretch and tdHomepageFullItem elements, but my knowledge of JS isn’t great so I wouldn’t know where to start. Is there a solution whereby I can optimise my Javascript code with Autoptimize, but without preventing the full screen header and background images appearing?

Thanks.

Post count: 35449

Hi boroguide, the theme need to use the JavaScript to set those background images, when you choose to ‘Optimize JavaScript Code’, most probably the code is no longer use in the right moment and the images are no longer set, therefore, if you want to keep that background image you must avoid that option from that plugin. Try with other settings from the plugin.
Thank you for your understating!

Post count: 12

Thank you for replying Calin.

Just for clarity, I see that it is possible to exclude individual scripts from Autoptimize when the ‘Optimize JavaScript Code’ is ticked. Is it possible, therefore, to place the JS that controls these elements into .js files and then exclude them so that Autoptimize can optimise the remainder of the script, while still allowing these images to show.

Or does this code work in conjunction with others i.e. if the tdHomepageFullItem js code was excluded but others weren’t, this would still cause issues?

Post count: 35449

Hi,
I think that you can set the file path and exclude from been Optimize, the js files that our theme is using are on this file path wp-content/plugins/td-composer/legacy/Newsmag/js
Hope this will help you!

Post count: 12

Thank you Calin. Early signs suggest I can indeed optimise the JS and exclude the necessary scripts with the path you suggested, so it looks to be working.

Thank you and merry Christmas.

Post count: 35449

Hi, I’m glad my advice was helpful!
Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newsmag’ is closed to new topics and replies.