diegomura / diegomura/react-pdf

Image width auto not supported

Open
#2,301 0 comments 1 reaction 0 assignees View on GitHub
new feature
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

I'm working on a function wich renders dynamic PDF evaluations content, the problem I have is with images, I don't know the width or height of images, so i'm trying to set style width to 'auto' but it doesn't work, the image always fits the page width.

Please, could you add support for set image width to 'auto' in order to keep images with their natural width in case we don't specify dimenssions.

The image placed is small but fits 100% page width, instead of keeping its natura width (or height).

![image](https://github.com/diegomura/react-pdf/assets/55887000/9ddd2352-c3a9-46fe-a5c2-9654393bf865)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.