Tiny inline images are generated with useGatsbyImage
robations opened this issue · 3 comments
Not sure if this is a bug or a question.
With html.useGatsbyImage = true
(default), all images from Wordpress are being resized to 150px wide or less. I can see from the WP Graphql API an image might be, say, 560x280px but is still displayed at 150px wide. The WP markup looks like:
<img loading="lazy" src="https://thewordpressurl/wp-content/uploads/2020/11/theimage.jpg" alt="lorem ipsum" width="560" height="280">
What I've tried:
- adjusting the
html.imageMaxWidth
andhtml.fallbackImageMaxWidth
parameters, but they don't seem to make any difference - looking through the plugin source, but I'm not sure how the image size is determined without digging in a lot further
- looking through open and closed issues, couldn't see anything directly relevant but apologies if this is a duplicate
Is this expected behaviour? Is there any other way of controlling the image size for inline images? Should I avoid useGatsbyImage
until more control is added?
Hi @robations if you update to the latest versions of all the plugins the fallback image size has been increased. If it's still a problem after upgrading (or you are on latest already), are you able to share a reproduction so we can take a look? Thanks!
@TylerBarnes thanks for your reply. I hadn't seen that the plugin has jumped a couple of major versions recently (3 -> 6).
I've now upgraded from 3.3.1 to 6.0.0, and applied a bunch of other minor/bugfix upgrades within the gatsby ecosystem, but I'm still seeing the 150px images.
I did already try setting html.fallbackImageMaxWidth
to 800, but it doesn't have any effect on the output. Is there another fallback size you are referring to?
Unfortunately, there is nothing public I can share immediately. I might be able to put a test case online, but will require setting up copies of both WP and gatsby.
In order to debug/fix this we'll need a reproduction repo and /graphql url - if you can do that please re-open this issue or drop a comment here at that time. Thanks @robations !