Code Monkey home page Code Monkey logo

Comments (4)

jstcki avatar jstcki commented on June 3, 2024

This is a webpack loader which is a tool to bundle resources in JavaScript. See https://webpack.js.org/

from responsive-loader.

jstcki avatar jstcki commented on June 3, 2024

That said, it’s possible to use webpacked assets in PHP projects. Is this what you’re looking for?

from responsive-loader.

strarsis avatar strarsis commented on June 3, 2024

@herrstucki: Yes! I want to use it with the sage 9.x theme (for WordPress)
which uses PHP (Blade) template files and webpack for building.
Ideally I could just specify an <img with srcset (not from WordPress CMS but in theme!) and
the responsive-loader should generate the right images.

Related discussion: https://discourse.roots.io/t/reponsive-images-resizing/10407?u=strarsis

from responsive-loader.

jstcki avatar jstcki commented on June 3, 2024

@strarsis I'm not really sure if that's possible in the way you want. It is possible to export webpack-generated assets to JSON and import that in PHP with something like https://www.npmjs.com/package/webpack-manifest-plugin. But to export the srcset attributes generated by this loader you'd probably have to create a JS file which exports them to JSON and import those in PHP somehow …

from responsive-loader.

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.