4

I've used SEOmatic and ImageOptimize together before and never had those issues. SEOmatic should care less about the presence of the ImageOptimize field on the asset and you definitely don't need to specify custom ImageOptimize variants for your SEO/social purposes. SEOmatic grabs the raw image (like you would grab the asset url in the templates) and does ...


4

So instead of using the dot syntax ., this would be a good place to use the subscript syntax []. {# dot syntax #} {{ foo.bar }} {# subscript syntax #} {{ foo['bar'] }} When you use the subscript syntax to access a variable's attributes, you can safely use variables (by just removing the single quotes surrounding the attribute). {% set bar = 'helloWorld' %...


3

So the OptimizedImages field in ImageOptimize is added to your asset as a field (just like Entries can have fields), because it's added to your Asset Volume layout. So you'd iterate through the images the same way you would iterate through any assets in Craft. I'm a little unclear on what part you're stuck on here? If you could clarify, I could help you ...


2

No, they do not replace Craft transforms. They are in addition to. And in fact, Image Optimize uses regular old Craft Transforms under the hood. Image Optimize will do three major things for you: Every image transform you do, whether it be via Craft image transforms, or the Optimized Images field will be run through a variety of image optimizers that you ...


2

FWIW, I would not recommend doing image resizing via your Twig templates, because it will do them on page load time. Rather, I’d recommend doing them via an Optimized Images field as per: https://github.com/nystudio107/craft-imageoptimize/blob/v1/README.md#dynamically-creating-optimized-image-variants But if you really want to do it, the parameter there is ...


2

So a per the documentation, the Optimized Images field should only be added to an Asset Volume's layout. You do not need to, and should not add that field to your Section field layouts. Please verify for me that after doing so, when you double-click on an Asset, you see a display similar to this: c.f.: https://github.com/nystudio107/craft-imageoptimize/...


2

So Image Optimize just uses regular old Craft Transforms to do its thing. So whatever would happen to transformed images that you deleted the transform for would happen here as well. I don't know the answer specifically, but if I had to guess, it'd be that Craft will not "clean up" its image transforms, and delete the ones that are no longer used. But you ...


2

This should be fixed by P&T: https://github.com/craftcms/cms/issues/5063 https://github.com/nystudio107/craft-imageoptimize/issues/171 https://github.com/nystudio107/craft-imageoptimize/issues/169


1

You might want to check out the discussion on this pull request. Since ImageOptimize uses regular Craft transforms, it's likely that this is something in the AWS S3 plugin. Indeed, there's an issue 400 Bad Request: token expired that appears to be identical. If there's something I can/should be doing to renew the token, I'll definitely make that change. I'...


1

Yep, using your above example, optimizedImages.colorPalette is an array, so you could do: // Output the most dominant color {{ optimizedImages.colorPalette[0] }} // Output the second-most dominant color {{ optimizedImages.colorPalette[1] }}


1

Worked with @andrew.welch and found that, although our site is using /html for the webroot, there also existed a /web folder. For a reason not yet identified, the plugin brought the /web folder to the surface as it was attempting to look in that folder. I simply deleted the /web folder, and everything works. The file craftcms/cms/src/console/Request.php ...


1

Image Optimize hooks into regular old Craft transforms to do its thing. This means that any time an image transform is created, it'll piggyback on that to create any variants such as the .webp versions. The thing is, Craft looks to see if the image transform is already on disk, and if so, skips the process of re-creating it. So if you enable .webp (or other ...


1

Based on our discussion in the comments I'm very certain that the problem lies within the settings of the fields in your assets. In your Optimized Image Variants have you set the Image Format wrongly? If it's not that, then I'm still leaning towards some field/setting rather than the plugin acting wrongly as there were no errors/warnings logged containing ...


1

You need to re-index your assets to show the correct URL after changes to your volume location when using imageOptimize. Just re-save the volume from within Craft CMS. Even if you have made amends to your volume config file you will need to re-save from within Craft CMS. To quote Andrew, the plugin author... "So I want to say that this is normal (though ...


Only top voted, non community-wiki answers of a minimum length are eligible