jarrekk / imgkit

🌁 Wkhtmltoimage python wrapper to convert HTML to image
MIT License
803 stars 73 forks source link

imgkit Fails to Render Dynamic Color Changes Set by JavaScript during HTML to Image Conversion #93

Open he-kishor opened 1 week ago

he-kishor commented 1 week ago

Bug I am using imgkit to convert HTML to an image, and my HTML contains dynamic elements where the color is set using JavaScript based on certain values. However, when I convert the HTML to an image, the color changes applied through JavaScript are not being reflected in the output image.

The issue seems to be that imgkit is not processing JavaScript before rendering the HTML to an image. This is causing any dynamic styling or content adjustments made via JavaScript to be omitted from the final image. A clear and concise description of what the bug is.

To Reproduce

  1. Use imgkit to convert HTML that contains JavaScript, where the color or other style attributes are modified dynamically based on a value.
  2. Attempt to convert the HTML to an image using imgkit.

Expected behavior The image should reflect the dynamic color or style changes applied by JavaScript in the HTML.

Actual Behavior The image does not render the dynamic color changes set by JavaScript, and only the static HTML styles are applied.

MacileHan commented 12 hours ago

Me too,I have a bug just like you.

MacileHan commented 12 hours ago

I think the key to the problem is wkhtmltoimage.