Generate thumbnail URL in PHP
-
Hello! Is there any way I can create a function that generates the lyte thumbnail image URL?
I want to rel=”preload” those images on blog posts for performance purposes so I’m looking for something like:
add_action('wp_head', function () { if(is_singular('post)) { ?> <link rel="preload" src="<?php the_lyte_thumbnail_url(); ?>" as="image"> <?php } });Is it possible? Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Generate thumbnail URL in PHP’ is closed to new replies.