Coder Social home page Coder Social logo

Comments (8)

shyim avatar shyim commented on August 29, 2024

Did you enabled webp in the plugin config?

from froshwebp.

DanMan avatar DanMan commented on August 29, 2024

Yes, I have. I'm using a template that inherits from the "Responsive" base template.

It works on a different server that doesn't use Plesk. So it might have to do with that. Is there some check implemented on the template level?

I'm not sure getGoogleWebpConverterPath() works as intended.

from froshwebp.

DanMan avatar DanMan commented on August 29, 2024

Another thing: when running frosh:webp:generate it only counts as much images as "stack" as there are in the media manager. Shouldn't the number be larger due to the thumbnails generated by sw:thumbnail:generate?

In any case, if I enable Smarty debugging, there are "webp" entries among the article thumbnails. But they're not used in the output.

from froshwebp.

DanMan avatar DanMan commented on August 29, 2024

Ok, so it kinda works, if I copy for example the plugin's FroshWebP/Resources/views/frontend/listing/product-box/product-image.tpl into my own template and re-compile it. But even then, not nearly all images are showing up. Most are broken.

from froshwebp.

shyim avatar shyim commented on August 29, 2024

frosh:webp:generate Just generates the images for the normal image. That's the reason why ./bin/console sw:thumbnail:generate -f is required.

Did you done both commands?
Have you something special configured in your theme?

from froshwebp.

DanMan avatar DanMan commented on August 29, 2024

Well, that's not what the installation instruction says, which is to run sw:thumbnail:generate first, then frosh:webp:generate. I've now run the former again, and now it seems to work.

But it also tried to convert the SVG files, which failed. We use one for the site logo, and that one's missing now. The generated HTML has changed and refers to a WebP image that doesn't exist.

Strangely, the browser doesn't fall back on the also referenced SVG file in the HTML but insists to show the broken WebP file instead. What gives?

from froshwebp.

shyim avatar shyim commented on August 29, 2024

PHP cannot handle svg ad Image. WebP should be ignored on svg

from froshwebp.

DanMan avatar DanMan commented on August 29, 2024

I've just tried it again with some banners, and it wasn't enough to run frosh:webp:generate first and then sw:thumbnail:generate. I had to use the force flag for the latter to have the new images show up.

That's ok for small albums like the one for banners, since you can pass the albumId as parameter. But if the product images change (new products added) and you must force re-generating all of them not just the new ones, it can take hours during which at least some images will be broken on the website. Not good.

Why is it that sw:thumbnail:generate doesn't pick up on the new images, if you don't force it?

from froshwebp.

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.