wp-e-commerce / WP-e-Commerce

WP eCommerce - The most popular independent eCommerce platform for WordPress
https://wpecommerce.org
GNU General Public License v2.0
213 stars 216 forks source link

TE2 Automatically generating intermediate image sizes on front-end #1809

Open JeffPyeBrook opened 9 years ago

JeffPyeBrook commented 9 years ago

I noticed something while reading through TE2. When TE2 generates a page it checks to see if the intermediate image size is available, if not it tries to generate the image on the fly. Could be a good feature for upgrades, but I am a concerned about what happens if a site had plugins installed that work with images.

The TE2 front-end code includes the wp-admin images code. I have seen this done before, but never really thought it was a good idea.

What happens if the site has plugins that work with images that rely on the image generation being part of the back-end. Any plugin that hooks the admin only images actions/filters would not be in the processing loop. Also, many sites seem to be using the WordPresss Photon CDN from JetPack, in that case the intermediate images sizes would not be required in the server wp-uploads directory, but WP-eCommerce would start filling the files.

It would seem that IF we wanted to generate the image from the front-end, the correct thing to do would be initiate an AJAX request to the back-end to create the image instead of forcibly including the admin side files into the non-admin logic

JustinSainton commented 9 years ago

@JeffPyeBrook Going to go ahead and punt this to 4.1, but if you are able to get around to it for 4.0, that's awesome, too!