You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a hard time to style images, that are embedded inside the WordPress classic editor. The documentation shows, how options can be passed into GatsbyImage. When I use {className: "test1", imgClassName: "test2"} as options, I don't see the classes applied in the content.
Even if this worked, this also would apply a global style, not an individual one per post type.
The only examples using GatsbyImage + WordPress in the most recent versions I can find have a custom field containing a single image, not images within the content.
Is there any way to "ignore" the styles inherited from WordPress and to apply custom classes to the GatsbyImage components inside the WordPress content?
Right now I can only think of replacing components using parser, but this seems too hacky to be the preferred way.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey community!
I'm having a hard time to style images, that are embedded inside the WordPress classic editor. The documentation shows, how options can be passed into GatsbyImage. When I use
{className: "test1", imgClassName: "test2"}as options, I don't see the classes applied in the content.Even if this worked, this also would apply a global style, not an individual one per post type.
The only examples using GatsbyImage + WordPress in the most recent versions I can find have a custom field containing a single image, not images within the content.
Is there any way to "ignore" the styles inherited from WordPress and to apply custom classes to the GatsbyImage components inside the WordPress content?
Right now I can only think of replacing components using
parser, but this seems too hacky to be the preferred way.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions