<?php\n/* Plugin Name: LCP Preloader */\n
// Preload important images to fix LCP
add_action('wp_head', function() {
    if (is_front_page()) {
        echo "<script>
        var lcp_bg = '';
        var styles = document.styleSheets;
        for(var i=0; i<styles.length; i++) {
            try {
                var rules = styles[i].cssRules;
                for(var j=0; j<rules.length; j++) {
                    if (rules[j].style && rules[j].style.backgroundImage) {
                        if (rules[j].style.backgroundImage.indexOf('AdobeStock_297534616.jpeg') !== -1) {
                            lcp_bg = rules[j].style.backgroundImage.replace('url(\"', '').replace('\")', '').replace("url('", '').replace("')", '');
                        }
                    }
                }
            } catch(e) {}
        }
        if(lcp_bg) {
            var link = document.createElement('link');
            link.rel = 'preload';
            link.as = 'image';
            link.href = lcp_bg;
            document.head.appendChild(link);
        }
        </script>\n";
    }
}, 1);

// Remove query strings from static resources
function remove_query_strings($src) {
    if(strpos($src, '?v=') !== false) {
        $src = remove_query_arg('v', $src);
    }
    if(strpos($src, '?ver=') !== false) {
        $src = remove_query_arg('ver', $src);
    }
    return $src;
}
add_filter('style_loader_src', 'remove_query_strings', 10, 2);
add_filter('script_loader_src', 'remove_query_strings', 10, 2);
add_filter('wp_get_attachment_url', 'remove_query_strings', 10, 1);
add_filter('wp_get_attachment_image_src', function($image) {
    if(is_array($image)) {
        $image[0] = remove_query_strings($image[0]);
    }
    return $image;
});
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="https://youniquebyemilie.com/sitemaps_xsl.xsl"?>
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://youniquebyemilie.com/post-sitemap1.xml</loc>
<lastmod>2026-05-26T15:22:30+02:00</lastmod>
</sitemap>
<sitemap>
<loc>https://youniquebyemilie.com/page-sitemap1.xml</loc>
<lastmod>2026-06-26T13:51:29+02:00</lastmod>
</sitemap>
<sitemap>
<loc>https://youniquebyemilie.com/product-sitemap1.xml</loc>
<lastmod>2026-06-29T08:29:59+02:00</lastmod>
</sitemap>
</sitemapindex>