Cropping / Resizing
-
I’m looking to use this plugin as a header, which shows a different image each time a page is loaded.
Is there any kind of “smart focus / crop” functionality which would display images based on their content rather than just a random view?
This explains what smart cropping is:
https://imagekit.io/blog/smart-crop-intelligent-image-cropping-imagekit/
-
Hi @hshah!
The option we have is the Focus X and Y points:
https://smartslider3.helpscoutdocs.com/article/1295-slide-settings-background#image-tabYou can use these to select which part of your image should stay in focus. So it is not automatic, but you can set it manually.
If you want a header, that always loads a different image, you would need the Randomize and Maximum slide count options, which his only available in the Pro version of our slider:
https://smartslider3.helpscoutdocs.com/article/1293-slider-settings-slidesI read about the Randomise option, which is why I was asking this question in the first place 🙂
I basically want to use the dynamic functionality to display images attached to a certain custom post type… this part seems fairly straightforward.
The issue I am foreseeing is that the Focus X and Y options wouldn’t be very useful because the images could vary. If I am having to go pick them out and set the focus percentages, then I might as well not bother with the dynamic functionality and pick the images manually.
/Edit: Can the Focus X and Y percentages be set for all images in a slider, or do you have to go in and define them manually for each image?
- This reply was modified 4 years, 1 month ago by hshah.
Yes, I’m sorry but for this case we don’t have an option. So if you want focus points, the best you can do is setting the images manually.
If I could find a way of getting such information to be added to the post meta, could I set the Focus X and Y values based on that?
Hi @hshah
We’ve added a variable field to the Focus X and Focus Y fields. I have uploaded a new build here for you to try: https://www.dropbox.com/s/h1f9y5mywp10ont/nextend-smart-slider3-wordpress.zip?dl=1
You should just go to your Plugins list, delete your current Smart Slider 3 (don’t worry, your sliders will stay) and install the new build like this:
https://smartslider3.helpscoutdocs.com/article/55-wordpress-installation#adminWow, I wasn’t expecting anything this quickly!
Just testing it out now and was wondering if variables can handle fields stored as arrays? For example, I have this in one of the postmeta fields:
a:2:{s:3:"top";s:5:"77.38";s:4:"left";s:5:"50.70";}
Which is basically:
Array ( [top] => 77.38 [left] => 50.70 )
I probably could alter the plugin I am using to create separate fields or have the values as just a string with a space in between, but thought I would ask this question here first 🙂
Hi @hshah
No, I’m sorry but the variables can’t work with arrays. You’d need to separate these values as simple number fields to be able to use them.
No worries, it didn’t take me long to write a small function to result in this:
I used the round() function to make the values set into whole numbers when adding the new post meta.
Now just a simple matter of setting those as variables.
I should be able to test properly today and give you some feedback 🙂
- This reply was modified 4 years, 1 month ago by hshah.
Does the free version allow you to use post_meta variables?
Hi @hshah
Sure, they’re added automatically as variables.
All I see is the default post meta:
id url title content description author author_name author_url author_avatar datemodified category_name category_link featured_image altimage thumbnail url_label excerpt
I’ve cleared caches etc but none of the other post metas seem to show up.
Hi @hshah
Are you seeing these in the record viewer: https://smartslider3.helpscoutdocs.com/article/88-generator-functionality#settings
or at the Insert variables?I created a simple meta using the default Custom field option:
and it shows up fine:Could there be something wrong with the build you uploaded?
When I try and use the Posts by Filter option is get no results.
The Posts by ID works though but the custom metas don’t show up.
I don’t think so. I’m using the same build.
Try running a plugin/theme conflict test: https://smartslider3.helpscoutdocs.com/article/1569-how-to-do-a-plugin-theme-conflict-test
maybe there will be a conflict causing this problem.“When I try and use the Posts by Filter option is get no results.”
Please make sure that the filters (at step 4: https://smartslider3.helpscoutdocs.com/article/139-wordpress-posts-generator#tutorial ) are set in a way that there should be result.I completely removed and reinstalled the plugin (deleted tables etc as well).
This is the Posts by Filter screen I see. The only thing I changed was the Slides value from 5 to 50 just as a test… it finds nothing.
Just had a thought… this wouldn’t find attachments would it? Maybe that’s the issue… I’m trying to get images which are of type “attachment” and this is only looking at standard posts.
I don’t see an option anywhere to get attachments (ie media) dynamically.
- The topic ‘Cropping / Resizing’ is closed to new replies.