Using HTML Object to Display the Featured Image of a Custom Post Type

WordPress
3 December, 2024 01:43:31
semilirbayu
Topics: 1
Messages: 2
The image appears when using [e2pdf-wp key="get_the_post_thumbnail"] in the Image Object. However, when I try to use the HTML Object to show the Featured Image of a custom post type, the images do not appear. I've attempted to follow the method shown in the attached image. What should I do to resolve this issue?
3 December, 2024 02:02:25
E2Pdf
Support
Topics: 7
Messages: 3345
Hello,

Try please to do the following changes:

1. Pay attention to the quotes on the image when using "src". Use "single" quotes:



Or use just:

[e2pdf-wp key="get_the_post_thumbnail" size="full"] - it's no need to put it in the "src" attribute as it should generate the "img" tag automatically.

2. In the CSS section, it should be:

img {
width: auto;
height: 100px;
}

3. If, after correction, it still doesn't work, please provide any "image" URL from your website so we can check if it has public access. You can mark the message as "private," so only support can see it.
We would really appreciate your feedback at WordPress.org!
3 December, 2024 03:35:46
semilirbayu
Topics: 1
Messages: 2
Thank you, the image now appear with single quote like this: <img src='[e2pdf-wp key="get_the_post_thumbnail_url" size="full"]'>