Show all products gallery images dynamically

WooCommerce Bug Resolved
8 March, 2024 04:05:05
John Green
Topics: 2
Messages: 7
Dear sirs.
I am trying to show all pictures from a product gallery.

If I try to do this with a single image:
---------
<p>Show URL: [e2pdf-wc-product key='get_gallery_image_ids' path='1' attachment_image_url='true' size='full']</p> -> This shows the Image URL

<p>Problem: <img src="[e2pdf-wc-product key='get_gallery_image_ids' path='1' attachment_image_url='true' size='full']" width="100px" height="100px"></p><br> -> I try to use the ImageURL to show inside HTML field but it does not appear.
---------
After that I would like to show dynamically all the pictures (gallery) from a product.
Can you help me please?

Best regards.
8 March, 2024 05:03:40
E2Pdf
Support
Topics: 7
Messages: 3346
Hello,

It seems we could replicate the issue on our side and already released an update with the latest RC version 1.23.06. Please follow the steps here to update: https://e2pdf.com/docs/install#rc-version

Please, let us know if the issue will be resolved.

P.S. As a tip, if you need to output all images in the "HTML" object, you can use [e2pdf-for] shortcode:

[e2pdf-for]
[e2pdf-data][e2pdf-wc-product key='get_gallery_image_ids' attachment_image_url='true' size='thumbnail'][/e2pdf-data]
[e2pdf-do]
<img src="[e2pdf-wc-product key='get_gallery_image_ids' path='[e2pdf-for-key]' attachment_image_url='true' size='thumbnail']">
[/e2pdf-do]
[/e2pdf-for]
We would really appreciate your feedback at WordPress.org!
8 March, 2024 06:55:55
John Green
Topics: 2
Messages: 7
Dear sirs.

Thank you very much indeed for your fast answer. I updated and now it is working.

I tried the code you suggest me as tip, and it works, but if I try to show pictures bigger (instead of "thumbnail" I use "full") it is not working. Probably I am doing something wrong but, Could you check it?

Thank you very much and best regards.
8 March, 2024 06:59:17
John Green
Topics: 2
Messages: 7
UPDATE.

I tried with this code and now it is working.

[e2pdf-for]
[e2pdf-data][e2pdf-wc-product key='get_gallery_image_ids' attachment_image_url='true' size='full'][/e2pdf-data]
[e2pdf-do]
<img src="[e2pdf-wc-product key='get_gallery_image_ids' path='[e2pdf-for-key]' attachment_image_url='true' size='full']" width="100px" height="100px">
[/e2pdf-do]
[/e2pdf-for]

I hope it can help.

Best regards.
8 March, 2024 07:09:32
E2Pdf
Support
Topics: 7
Messages: 3346
Yes, indeed, setting "width" and "height" was required. Without setting the width and/or height, E2Pdf will try to render with the original size, and if the block doesn't have enough space - images will be truncated.

Glad to hear that the issue has been resolved.
We would really appreciate your feedback at WordPress.org!