Giter Club home page Giter Club logo

Comments (4)

Jehu avatar Jehu commented on June 29, 2024

Same Problem here.
In our case it is a Custom AcfBlock with an image in it. All following blocks are rendered inside the gatsby-image-wrapper

Edit: oh we use gatsby-wordpress-experimental-inline-images by the way.

from gatsby-wordpress-inline-images.

garethgd avatar garethgd commented on June 29, 2024

Hi @Jehu,

This is far from a permanent solution but it works for me for building my articles at the moment.

I narrowed the issue down to a missing closing div for each gatsby-image-wrapper
If you are using dangerouslySetInnerHTML for your post content you can create function to correct the markup:

parsePostContents = (contents) => {
     let replacedContent = contents.replace(/<\/noscript><\/div>/g, '</noscript></div></div>')
     return replacedContent;
  }

You can then use parsePostContents here:

<section
   className="post-content"
   dangerouslySetInnerHTML={{ __html: this.parsePostContents(post.content)}}
/>

AFAIK @TylerBarnes and the Gatsby team are current working on full fledged solution to Wordpress. So hopefully this ties you over for the moment

from gatsby-wordpress-inline-images.

Jehu avatar Jehu commented on June 29, 2024

@garethgd My colleague has copied the plugin to a local plugin and made some changes on the code. This resolves it for now. He may consider a pull request.
Oh and wrapping the <img> in a <figure> is a must to get the closing tag problem solved.

from gatsby-wordpress-inline-images.

TylerBarnes avatar TylerBarnes commented on June 29, 2024

Hey all, @garethgd is correct, we're currently working on a completely new WP source plugin that uses WPGraphQL and the functionality of this plugin will be built directly into the source plugin. All my attention has been focused there as the plan is to deprecate gatsby-source-wordpress@v3 and our usage of the REST api. There are too many unavoidable issues with using an untyped API. If anyone is interested in maintaining this package let me know!

from gatsby-wordpress-inline-images.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.