Account created on 13 February 2014, almost 11 years ago
#

Merge Requests

Recent comments

πŸ‡§πŸ‡ͺBelgium kubrick

kubrick β†’ made their first commit to this issue’s fork.

πŸ‡§πŸ‡ͺBelgium kubrick

I'd be ok with making it configurable. Which way should be the default behavior?

The current configuration for the module links to "Generate image styles" page, adding the option there feels out of place to me.
While making it part of the display config might make it too granular - I'd think I'd prefer it to be a global setting.

πŸ‡§πŸ‡ͺBelgium kubrick

The module used to convert to webp if you had eighter imageapi_optimize_webp or the webp module, but there's been a regression in the latest version when avif support was added.

I agree #2 would be a more elegant solution since it does not require any extra modules.

Not sure if I should open a new issue for this or we should just focus on getting ✨ Alter hook to adjust image effect RTBC to stable.

For now I've added my fixes in a patch.
It should serve avif, webp or fall back to the original format depending on which modules you have installed.

πŸ‡§πŸ‡ͺBelgium kubrick

kubrick β†’ changed the visibility of the branch 9.2.x to active.

πŸ‡§πŸ‡ͺBelgium kubrick

kubrick β†’ changed the visibility of the branch 3120847-non-exposed-and-exposed to hidden.

πŸ‡§πŸ‡ͺBelgium kubrick

I'm having issues with the build url's but only for SDC's. Is this the same problem you're having?
Changing the path in rewriteLibraryForDist() fixes it for me.

πŸ‡§πŸ‡ͺBelgium kubrick

kubrick β†’ made their first commit to this issue’s fork.

πŸ‡§πŸ‡ͺBelgium kubrick

I worked around this in my vite.config.js.

    build: {
      outDir: "dist",
      manifest: true,
      rollupOptions: {
        input: [
          "src/scss/main.scss",
          "src/scss/ckeditor.scss",
          "src/js/*.js",
          "components/**/*.js",
          "components/**/*.scss",
        ],
        output: {
          assetFileNames: (assetInfo) => {
            // dont hash the ckeditor css
            if (assetInfo.name.match(/ckeditor\.css/)) {
              return `assets/ckeditor.css`;
            }

            return `assets/[name].[hash].[ext]`;
          },
        },
      },
    },
πŸ‡§πŸ‡ͺBelgium kubrick

I looked into this to see if it was something I could create an MR for myself, but it seems it might actually be a Drupal Core "issue".
Admin Dialogs doesn't contain any JS and relies on core's built in dialog functionality.

πŸ‡§πŸ‡ͺBelgium kubrick

kubrick β†’ changed the visibility of the branch 3443405-thumbnails-in-medialibrary to active.

πŸ‡§πŸ‡ͺBelgium kubrick

kubrick β†’ changed the visibility of the branch 3443405-thumbnails-in-medialibrary to hidden.

πŸ‡§πŸ‡ͺBelgium kubrick

Thanks! Looking good!

Regarding 3.

I noticed the same issue again with certain smaller images not loading because the src attribute was missing.
This happens if the original image is wider than the width of its parent, so the src does not get re-added in updateImage().

I've added a patch that always runs the updateImage logic if the src attribute is missing.

Besides that is also noticed original images sometimes loading even with the removeAttribute('src') line. When they're inside the viewport when the page loads the images are loaded before the JavaScript can remove the src. I don't think removing the src in the Twig templates would be a good fix so probably best to leave it.

πŸ‡§πŸ‡ͺBelgium kubrick

Sure!

I also rerolled the patch since my Prettier changed the formatting on the previous patch.

New at contributing so bear with me πŸ™ˆ

πŸ‡§πŸ‡ͺBelgium kubrick

During testing I had some images not load because the src did not get set.

I've made some changes to the observers:

  • Only add the resize observer once the lazy image hits the intersection observer.
  • Remove the check in updateImage() that checks if the image is in the viewport, since this function can't run anymore before the IntersectionObserver fires.
  • Remove the intersection observer after the first intersection. (not related to the bug but might be better to remove it once it's not needed anymore)

Here's some videos with the network tab open:

Some images not loading: https://www.dropbox.com/scl/fi/6jrb522ue812ofawvcjbt/1.mov?rlkey=puc0r3v...
New patch: https://www.dropbox.com/scl/fi/xjzx3sq7whqdstglwebvu/2.mov?rlkey=jx1uz80...

The smaller images wouldn't really need easy_responsive_images but works as a demo.

πŸ‡§πŸ‡ͺBelgium kubrick

Thanks!

I can't seem to apply the patch. Is this for 1.3.2?

Maybe we don't even need the intersection observer if you got rid of the preloading.
Wouldn't the browser's native support for the lazy attribute take care of everything?
Or do they load immediately if you override the src on the image?

Production build 0.71.5 2024