I want to Host WordPress thumbnails as base64

Question

how to base64 encode images in wordpress template

I followed the tutorial from this and pasted the code in functions.php file

Now i am getting problem in temtplate level

I want to imageEncode() the following code

<img alt="<?php echo get_the_title(); ?>"  data-spai="1" class="lzl" data-spai-upd="64"  src="<?php $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id,'120', true); echo $image_url[0]; ?>" ></img>

How can I achieve this

0
Towfeeq Ahmad 3 months 0 Answers 15 views 0

Leave an answer