justcoded / just-responsive-images

WordPress Plugin to support better responsive images with <picture> tag, backgrounds, retina support etc.
48 stars 8 forks source link

How to handle increasing file size load? #15

Closed therajumandapati closed 6 years ago

therajumandapati commented 6 years ago

@aprokopenko We're using JRI in many production websites. If we're using too many custom sizes, we're ending up creating many different sizes for each image uploaded to the site. In some cases, we're ending up with more than 20 sizes for a single image. This is causing a negative impact on the file size of the website.

Are there any recommendations in terms of how we can avoid this? Or if it's possible to ensure a size only gets generated if an image is going to be used in a particular page/widget?

aprokopenko commented 6 years ago

Hi Raju,

Yes, we faced with the same problem on really big sites. We're working on new release, which will have a resize-on-demand feature.

therajumandapati commented 6 years ago

@aprokopenko That's wonderful news. Any idea when you're planning this release to go out? I'd love to help in any way I can

aprokopenko commented 6 years ago

Hi Raju,

Our developers works on them when we don't have delays in commercial projects. There are only few days of work left, but I can't say the exact date. I hope this will happen in February. If you need this update earlier, you can order it for some $$ :)

therajumandapati commented 6 years ago

@aprokopenko Haha I can help with my time(translates to $$), if you have an outstanding list of issues that you can share or work in terms of tasks etc here in Github, maybe someone from my team can help with it?

aprokopenko commented 6 years ago

Let's check if we will have progress this week. If not - I can open a new issue with technical description of how to adjust the plugin. And if you have time with your developers you can do a pull request. Anyway I will send you an email with updates. We will need help with testing this new feature.

therajumandapati commented 6 years ago

@aprokopenko Do you see any concerns of integrating an on-demand image resizing functionality? Instead or along with resizing during upload.

aprokopenko commented 6 years ago

This is actually what we're working on. We will keep standard sizes thumb, medium, large - which will be resized during upload. All other sizes will be generated "on-demand" only

therajumandapati commented 6 years ago

@aprokopenko Great, will that service be living inside the plugin? If yes, then we should be concerned about the server resources and response times. Would love to have an extended conversation about this. Looking forward to contributing.

aprokopenko commented 6 years ago

Yes, this will be inside the plugin. And yes - first page load (when no images generated) will take more time for response. However, when you create a page/post - you usually check how it looks. So for the end site visitor - it will be a normal time (because admin checked the page and generated the images).

therajumandapati commented 6 years ago

So the image sizes will only be generated if a page is requesting that asset in that particular size, right? And once the image size is generated, it will be served for future requests. And for images that won’t be requested in a particular size, JRI will never create those sizes. Correct?

And how will this work with Regenerate Thumbnails functionality?

Thanks, Raju

Want to meet with me?

On Feb 14, 2018, 1:01 PM -0600, Alex Prokopenko notifications@github.com, wrote:

Yes, this will be inside the plugin. And yes - first page load (when no images generated) will take more time for response. However, when you create a page/post - you usually check how it looks. So for the end site visitor - it will be a normal time (because admin checked the page and generated the images). — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aprokopenko commented 6 years ago

Yes, this is correct.

We expect, that regenerate thumbnails won't be needed anymore. Plugin will define configuration changes and regenerate thumbnails by itself.

We almost finished one more plugin to optimize images with google page speed insights - so we will need to check and adjust this new feature with another plugin, because for now it use standard image meta details and assume it has all files resized. (Tomorrow we will run tests on several of our live sites, if you want you can join in testing process with your own sites)

therajumandapati commented 6 years ago

That’s a great idea Alex, I’m willing to test on some of our live sites.

Would you be sharing the beta version of the plugin?

Thanks, Raju

Want to meet with me?

On Feb 14, 2018, 1:09 PM -0600, Alex Prokopenko notifications@github.com, wrote:

Yes, this is correct. We expect, that regenerate thumbnails won't be needed anymore. Plugin will define configuration changes and regenerate thumbnails by itself. We almost finished one more plugin to optimize images with google page speed insights - so we will need to check and adjust this new feature with another plugin, because for now it use standard image meta details and assume it has all files resized. (Tomorrow we will run tests on several of our live sites, if you want you can join in testing process with your own sites) — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aprokopenko commented 6 years ago

Hi Raju,

Finally we did it: https://github.com/justcoded/just-responsive-images/releases/tag/1.4

Please take in mind that this feature is not working with Just Image Optimizer auto-mode. We will fix both plugins to work together with this image resize "on-fly" feature in the next release this month.

therajumandapati commented 6 years ago

@aprokopenko Yayyy, congratulations 🥇

Can't wait to use it