wpsmartcrop
Forum Replies Created
-
This is not a bug. The renderblocking nature of the css and js incorporated in smartcrop is necessary for the plugin to be able to load images in their cropped state without a flash of unstyled content.
Google’s Page Speed test has no way of testing the function of render-blocking scripts for speed or function, and should only ever be taken as a rough guide, not a hard rule.
Forum: Plugins
In reply to: [WP SmartCrop] WP SmartCrop with AJAX loaded postsI saw your pull request to add this feature. I’m going a slightly different route with a soon to be released update, that will turn the javascript rendering function into a full jquery plugin that can be applied to image elements at any time. As soon as I manage to shoot a couple more bugs on the admin side, you’ll see an update.
Forum: Plugins
In reply to: [WP SmartCrop] Does this work with S3 Offload?Having read through the plugin’s source, it looks like it should be working. My guess would be that S3 doesnt immediately invalidate resources on update, and you may have to wait for the cropped resources to expire in the s3 cache for the updated thumbnail to take effect.
If not, this appears to be a bug with S3 Offload, as the
wp_update_attachment_metadata
filter on line 189 ofamazon-s3-and-cloudfront.php
should be uploading the new thumbnails to s3. I’d suggest filing a bug report with Delicious Brains.Forum: Plugins
In reply to: [WP SmartCrop] Does this work with S3 Offload?I’m not sure how thumbnails work with s3 offload, but I’m guessing they don’t automatically get pulled on regeneration. However, the more advanced use of smartcrop should work. Try adding an image into post content at full size, then use css to set the width and height. smartcrop should step in and make sure the image crops live in-browser.
I’ll look into S3 offload. it may be possible to trigger a cache refresh.
This should be resolved in the update pushed today
Forum: Plugins
In reply to: [WP SmartCrop] Illegal offset type in isset or emptysorry for the late response. I think this is a warning that gets sent when the “size” parameter isn’t set by the image in question… I have pushed a point update that attempts to deal with this as an edge case, but I haven’t been able to reproduce the problem on my installs, so it’s a best guess for now. If you’re willing to try again, let me know if things change… also, theme names, wordpress version, and any plugins installed could help me further reproduce.
Forum: Plugins
In reply to: [WP SmartCrop] Request: Make this work with background imagesWhile it is certainly possible for the same cropping method to work with background images (in modern browsers), it would be difficult to build into a plugin, as wordpress leaves the markup used for background images to the theme to implement, so it would require manual modifications by the theme, or much more resource intensive ajax image checks by the plugin, that would degrade site performance.
I may look into adding some helper functions, so that theme developers can add support for background images, if they so feel, but no promises.
If you can show me an example of where you’re having issues with using image tags, I may be able to suggest a workaround.
- This reply was modified 8 years, 2 months ago by wpsmartcrop.
Forum: Themes and Templates
In reply to: [Sensible WP] Hero image crop adjustmentbackground-position: center center;
will tell an element withbackground-size:cover;
to crop relative to the center of the image. By changing the background position property’s value, you can tell it to crop to different positions.it’s still a bit janky as those values don’t map to the image center for any value other than
center
but with enough breakpoints, it will do the trick.Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon Crop-ThumbnailsUnfortunately, no… the only option to cache invalidate with Photon is to actually contact automatics, and they will invalidate individual images… seriously, just don’t bother with photon until Jetpack gets its act together, use cloudflare or luminary or something.
Forum: Themes and Templates
In reply to: [Sensible WP] Hero image crop adjustmentThere are several plugins that can help you modify how wordpress crops images. My personal preference is (obviously) WP SmartCrop (https://www.wpsmartcrop.com). It lets you choose a “focal point” in your image (such as a face), and generates all thumbnails in such a way as to try to keep that point close to a rule of thirds position in the image, to give you a clean, well-composed crop.
If you get really fancy, WP SmartCrop also supports CSS softcropping, which can let you set rules for how the image should be sized on any screen size, and it will create your cropped images on the fly, to optimize for every screen.
Forum: Plugins
In reply to: Image Cropping MethodsWithout access to a copy of the theme files or access to your dev site where i could see the issue live, there’s not much I can do on my end. I can say that it looks like Enfold seems to modify the html output of the featured image tag, to enforce some sort of image overlay, as well as their own trivial version of soft-cropping. They may be doing that in a way that conflicts with the data attribute added by WP SmartCrop.
You could try opening the image in your image library, checking “Enable Smart Cropping”, and then clicking the focal point of the image. Then, once the focal point auto-saves, disable smart cropping again. That should ideally regenerate your post thumbnails to use your focal point, but should not attempt to make the image crop in the client’s browser.
If you’d like further help with this issue, you could always send a link to your dev site to me privately at [email protected], or send me a copy of the enfold theme and your child theme, to install on my own test site to see what’s going on.
Forum: Plugins
In reply to: Image Cropping MethodsThis could be my first bug report! Can you show me a link where I can see the problem in action, or tell me what theme you’re using? This also probably would be best handled on the support section of the plugin page with a bug report, so as to not clutter the forum. Thanks
Forum: Plugins
In reply to: Image Cropping MethodsYou are correct that M.E.A.U.H. is made by Interconnect.it, rather than Tribe, I misspoke.. For several months they had a post up in the support section saying that development was on a hiatus due to lack of interest and other commercial concerns. It looks like they’ve reversed that position, and are now considering pursuing releasing a premium face detection addon.
However, regardless of their revival, they still approach cropping in a fundamentally dated manner. If you are going to let an algorithm choose your crop, why only allow it to crop to a specific set of dimensions? Instead, use responsive src sets to load the right initial image, then crop it in the client’s browser, on the fly, to match whatever screen-size they have. That way you can have fluid images.
Forum: Plugins
In reply to: Image Cropping MethodsMy eyes are up here has mostly been abandoned by Modern Tribe. I actually released a new free cropping plugin a couple weeks ago, to pick up where it leaves off. Not only does WP SmartCrop allow you to set your images’ focus area for wordpress thumbnail cropping, but it also supports responsive, client-side cropping, so you don’t have to settle for fixed aspect ratios at all. It’s also under active development, so you can expect more features soon, like bulk processing, face recognition, and zoom/crop combos for optimal results.