Asked

what is the best practice today to generate webpage screenshots via the use of php and js?

I've stumbled upon https://screen.rip/, but never used it before.
If you're thinking about rolling out your own solution (because it will be a core part of your business), I'd personally roll out something based on Headless Chrome + API. There are already made solutions like https://github.com/GoogleChrome/puppeteer, Docker containers with Headless Chrome, etc.

Sign in to answer 😃