acf-image-crop's People
Forkers
cyberwani netconstructor wordpress-plugin pmj104 adanarchila raket chuckhendo philcowart jgrossi polevaultweb himalayan-institute vitalijm tarecord danielsetreus markbowenpiano kyuumeitai fuka2000 joppuyo ajoah usabilitydynamics kellenmace chrispage1 toshotosho coddent renatobrj the-cc-dev 89gsc tuner7777 netsco mhigley jameelmosesacf-image-crop's Issues
I cant edit the crop after initially adding it
Add image quality option
In the current version of the plugin a quality value of 100 is used when the crop is applied.
$image->set_quality( apply_filters('acf-image-crop/image-quality', 100) );
This unnecessarily blows up the filesize of the generated images and should by default better be set to 90%.
I'd even more appreciate a hook into the plugin to set the compression quality from my functions.php or have an option in the WP-admin's plugin settings.
[Feature Request] Pass post_id with perform_crop ajax function
Latest version of acf-image-crop (1.4.9) introduce a new filter to customize the postfix of a cropped image.
At this point could be very useful, during the execution of this filter, to know the post_id of the current post where the cropped image is attached.
This way we can strongly customize the name of a cropped image, even based of the current parent post.
This could be easily done passing the post_id variable within the perform_crop function.
Image Object Selectable with Save cropped image in media library set to No
So, I'm probably missing something, but the documentation says the only way to use the tool if you've set "Save cropped image in media library" to "No" is via the "Image URL", but "Image Object" is still accessible.
This is fine (in fact, it might be preferred for me), but it appears to still save a cropped image in the media library.
It looks like the only way to reference both the crop and non-cropped versions of an image (which is what I want to do) are if done via the Image Object or possibly via Image ID, or is there a way to do that via Image URL as well?
Ideally I'd like to be able to have only one image saved, and reference the cropped data, as well as the original image. Does that make sense?
Is that possible, and I'm just doing something wrong?
Dark overlay freezing after crop
fix for missing metadata in cropped image
in the cropped image the description, caption and alt metadata ist lost.
find
// Get the filetype
$wp_filetype = wp_check_filetype(basename($targetFilePath), null );
$attachment = array(
before this get the date as vars:
$originalFileObject = get_post($id);
$originalFileDescription = $originalFileObject->post_content;
$originalFileCaption = $originalFileObject->post_excerpt;
$originalFileAlt = $originalFileObject->_wp_attachment_image_alt;
the change the array:
$attachment = array(
'guid' => $mediaDir['url'] . '/' . basename($targetFilePath),
'post_mime_type' => $wp_filetype['type'],
'post_title' => preg_replace('/\.[^.]+$/', '', basename($targetFilePath)),
'post_content' => $originalFileDescription, // new!
'post_excerpt' => $originalFileCaption, // new!
'post_status' => 'inherit'
);
and after this add the alt to the new file:
update_post_meta( $attachmentId, '_wp_attachment_image_alt', $originalFileAlt );
"Uncaught TypeError: undefined is not a function" when editing Widgets
- Advanced Custom Fields Pro Version 5.1.7
- WordPress 4.1
- Advanced Custom Fields: Image Crop Add-on Version 1.4.1
When I visit Appearance -> Widgets (wp-admin/widgets.php) I'm receiving the following error in my console:
Uncaught TypeError: undefined is not a functioninput.min.js?ver=5.1.7:1
acf.get_selectorinput.min.js?ver=5.1.7:1 acf.get_fieldsinput.js?ver=4.1:435 (anonymous function)input.min.js?ver=5.1.7:1 rinput.min.js?ver=5.1.7:1 tinput.min.js?ver=5.1.7:1 acf.do_actioninput.min.js?ver=5.1.7:1 (anonymous function)load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,underscore,shortcode,plupload,json2,jq…:2 jload-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,underscore,shortcode,plupload,json2,jq…:2 k.fireWithload-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,underscore,shortcode,plupload,json2,jq…:2 m.extend.readyload-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,underscore,shortcode,plupload,json2,jq…:2 J
This error only shows up when the Image Crop Add-on is activated (only ACF and Add-On activated - all other plugins deactivated).
Cropping tall images makes the bottom of .crop-stage get out of the viewport
Update action broke the whole site
Today I update this plugin and it broke my whole site. Other things were fine but all the images are gone.
I checked the Media page and there are all the images.
I rolled back to version 1.4.11 and it worked again.
I am running WordPress version 4.8.
Cropping very slow
Running latest version of both plugins ACF PRO 5.5.11 / ACF Image Crop Add-on 1.4.10
Crop still works but is very slow. Upwards of 10 seconds.
Returning black image
ACF V5 Pro update - Image crop not displaying as a field type?
Impossible the retrieve the cropped image
Hi there,
I just use and it returns nothing.
(Return value is set to image URL). Any idea what may cause the problem ?
ACF works fine though.
Edit cropped image shows modal with empty & missing fields
ACF Pro Version 5.6.7
Advanced Custom Fields: Image Crop Add-on Version 1.4.12
When trying to edit the added image in a post, the modal looks like this:
https://i.imgur.com/X2qp1gZ.png
no errors in console. any ideas?
Add min/max size
It would be great if you could add a feature where you could require the image to be a min/max size.
Fork for new features
Hi
Wrote an issue on wordpress.org with the plugin - or rather a feature request considering the crop option of a fixed width and flexible height. (https://wordpress.org/support/topic/crop-to-minmax-width-flexible-height/) Been looking through the code... I think I know how to do it.
If I would fork this repo and implement that - would you be willing to merge the changes into this project and continue to maintain it?
Field data should be JSON-array instead of just image id
Needs polishing in WP 4.8.1 + check compatibility with ACF Pro gallery field
Hey guys,
Noticed some CSS quirks in combination with the latest ACF PRO + WordPress version. See screenshot:
Also, please check on the compatibility with the Gallery field. Adding images to a gallery also triggers the "add" function of a crop field on the same page, inserting the cropped version into the gallery as well.
Keep up the good work.
// T
No crop markers visible (ACF 5.4.6 / WP 4.6.1)
This plugin is perfect for my current site, and I was very elated to come across it! Sadly, after install and setting up the field in ACF, the crop modal seems not to function as intended.
The image is shown at full opacity, and when clicking anywhere on the image, it dims as if to show a selection, but no crosshairs or markers show. I've tried it a few times, in a few ways, and inspecting the page / console doesn't help.
Wordpress: 4.6.1
Advanced Custom Fields PRO: 5.4.6
Image Crop Add-on: 1.4.9
Fatal error
If I set Return Value to anything except “Image ID” I get this error:
Fatal error: Cannot use object of type stdClass as array in [snip]/wp-content/plugins/acf-image-crop-add-on/image_crop-v4.php on line 361
This is on a new install, latest version of WordPress, ACF, and your plugin, no other plugins installed, using Twenty Fourteen theme.
WP_Error::set_quality()
PHP Fatal error: Call to undefined method WP_Error::set_quality() in /var/www/html/site/sustentabilidad/wp-content/plugins/acf-image-crop-add-on/acf-image-crop-v5.php on line 526, referer: https://institucional.cablevisionfibertel.com.ar/sustentabilidad/wp-admin/post.php?post=247&action=edit
Not an issue: wordpress responsive image sizes
Hi there,
Can you still generated different responsive image sizes if you use this crop addon?
Greetz,
Broken in latest update - 1.4.12
Error in crop area position.
[Feature Request] do_action after resize images
Hi, it would be possible to add "do_action" before and after resize images (I mean generation of thumbnail, medium,medium_large,large, etc.., not source file!) from source file? It would be usefull to add some watermark to source image for example.
Doesn't work correctly with ACF Pro 5.2.7
I'm using your plugin in a frontend form and it's been working great. Unforunately it doesn't with the latest version of ACF Pro.
The issues I'm facing:
- the cropped version as well as the original size shows in the field inside the form
- the crop button is doubled
- when I hit one of the crop buttons an empty overlay shows up
Can't pull different sizes, when used in a repeater field
Hi there,
I have 4 ACF-Image-Crop-subfields in a repeater and it seems I can't pull the different image sizes, like this:
https://gist.github.com/monoescape/5f972e4be7c04457f56d
It's working, when using a normal ACF-Image-field. Any ideas?
I'm using image IDs and saving hard-cropped images to the media library.
Cheers
Heiko
Edit and Remove buttons
The edit and remove buttons are no longer working with Version 5.3.2.1 of ACF Pro.
Just need data-name="edit-button" and data-name="remove-button" "button" removed and it works again.
Library: Uploaded to Post vs. All
Built-in Image field includes an option 'Library' allowing selectable images to come from the Media Library or only from images uploaded to the specific post.
Certainly with front-end forms, but also with non-admin post authors, it would be nice to have similar functionality for the image-with-crop field.
Not interchangeable from standard image field
It should be easy to swap between a standard image field and a crop image field, both for improving old sites and for removing this plugin if necessary.
Full size crop
Hi there,
If i upload a 1920x1080 image and my crop for example is 735x400 i notice that the cut is always on the top left corner. Is it possible to make this always max centered? In 90% of the user cases people will want to get a wide as possible view.
great work so far 👍 hope you hear from you :)
Paul
ACF Pro 5.7-RC1 - Cannot choose image
I am testing the ACF Pro 5.7 release candidate. I find that I can add an "Image with user-crop" field and that it will display in the page edit screen, but when I click the "Add Image" button nothing happens.
I suspect this is related to the major JavaScript changes between ACF Pro versions 5.6 and 5.7.
Broken with ACF 5.6.1 Update
After updating to ACF 5.6.1 all of my custom fields with cropped images were removed from my site because "Image with Crop" was no longer available as an option in ACF. It defaulted field type to Text instead of Image with Crop.
Image attachment details not working
When trying to edit an image with user crop selected in the acf field options, the Image attachment details section fields are set as readonly. We tried to fix this with a js hack but it doesn't work as details are not saved. Any ideas?
Two Illegal String Offsets in acf-image-crop-v4.php
This plugin is fantastic, but I've noticed one thing: I get PHP warnings in the error log about illegal string offsets for 'retina_mode' and 'hide_cropped' in acf-image-crop-v4.php. Not a huge deal, to be sure, but I think changing lines 922 and 934 to do an isset() for the appropriate key in $options before setting $value fixes this.
Now, I'm not sure why my install is using v4.php instead of v5, but that's a bit beyond my current understanding. That being said, this whole issue may be moot. But I figured I'd let you know anyway.
Keep up the awesome work!
John
Version 1.1.1 bugs and a small feature change request
Thank you for quickly fixing the ACF5 issue for us. Much appreciated.
A few issue that we've spotted...
Force user to crop
Can't really see this doing anything. I can still add an image, and publish the page with out cropping the image. What is meant to happen here? Are we missing something?
Save cropped image to media library = yes & Return = Image object
This actually does not seem to create a new media library item anymore? And this is what is returned as the image object...
stdClass Object ( [image] => 2014/07/GSX-RL4_action_1_646x340_acf_cropped.jpg [preview] => 2014/07/preview_GSX-RL4_action_1_646x340_acf_cropped.jpg )
So I'm guessing its a little buggy, but it works still. How ever we need it to work differently.
This is how I think it should work. Please trust me here, it's only a small change...
Use this function: Save cropped image to media library
And rename it to: Save cropped image as new media library item
If is 'NO' get the image path of the target image, use this image path and delete using unlink(image)
before the new image is cropped, and then save the new cropped version with exactly the same name. Do not add _acf_cropped into the filename. Basically just replace only the target size image with the new cropped version.
This means, we can use the Image URL, Image ID and Image Object. No need to disable Image ID and Image Object this way :-)
!!! Please note you are using an underscore before the dimensions in your image filename, wordpress uses a hyphen just before the image dimensions rather than a underscore. Line 498.
And this is better because you are updating the original media library item. But you are only ever updating the target size. Which is great because this allows the user to have different cropped sizes for all their images sizes, all in the original media item. In turn allowing us to use the Image Object and Image ID.
If is 'YES' then this should just create a new media library item just for this target image size. Just like it did in version 4. And you can add _acf_cropped into the file name for this version so it does interfere with original media item.
We tried to implement this ourselves. But we didn't test the plugin thoroughly enough before we started modifying the plugin, then released the plugin does not create a new media item anymore, so we were struggling to get the whole thing bug free.
Many Thanks
Different crop and position from different fields
I have a site selling plans. Every plan has 2 featured photos, each of which appear on the site in multiple places at different sizes. I could predefine image crop and position sizes in my custom theme's images.php file, but each image would need a different position which can be very tedious to do by number especially multiple times per image.
Is there a way to create a grouped set of custom fields for each plan, and include conditional visibility for the plan crop sizes. Once the user uploads or selects a featured photo for the plan, the custom crop fields appear to crop and reposition the image for different places.
These should be able to be adjusted/reset later, since they should readily rely on the parent photo.
Issue reference: https://wordpress.org/support/topic/different-crop-and-position-from-different-fields
[ACF-V5] Missed class in div.hide-if-value
There is no global wordpress "button" class inside div.hide-if-value link element and 'Add image' link displays as it is.
Broken in ACF 5.5.5
After updating to 5.5.5, I am no longer able to save image fields with this plug-in.
I have the field loaded on an options page.
I select, and image, crop it, and save the page.
The page reloads without the image, and it is not saved to the database.
Same if I do not crop it.
Using the standard image field works fine.
Broken with ACF version 5.6.0
Hi there,
With the new update of ACF the plugin doesn't work anymore!
Below are the errors:
Warning: json_decode() expects parameter 1 to be string, array given in /srv/www/perfettivanmelle/htdocs/wp-content/plugins/acf-image-crop-add-on/acf-image-crop-v5.php on line 946
Notice: Undefined index: save_format in /srv/www/perfettivanmelle/htdocs/wp-content/plugins/acf-image-crop-add-on/acf-image-crop-v5.php on line 959
Notice: Undefined index: save_format in /srv/www/perfettivanmelle/htdocs/wp-content/plugins/acf-image-crop-add-on/acf-image-crop-v5.php on line 973
Can you fix this?
Overlay modal not appearing correctly after WordPress 4.2.2 upgrade.
Compatibility with translate.wordpress.org
Hi,
Your plugin doesn't work with translate.wordpress.org for the moment :/
Unless I am mistaken, there are 2 problems:
- your text domain must be equal to your plugin slug
- text domain header is missing
Plugin breaks media library
Hi Anders,
I get the two following warnings on one of my websites:
PHP Warning: Illegal string offset 'hide_cropped' in /data/home/.../wp-content/plugins/acf-image-crop-add-on/acf-image-crop-v5.php on line 640
PHP Notice: Uninitialized string offset: 0 in /data/home/.../wp-content/plugins/acf-image-crop-add-on/acf-image-crop-v5.php on line 640
I fixed the problem by adding the following code:
$hide = ( isset($options['hide_cropped']) && $options['hide_cropped'] );
The PHP version on the server with the problem is: 5.5.17
Large pic field images have been scaled down automatically to 678x300px
There's a problem with the large image fields (in our case, 1800x600px) after the newest WP update.
Screen 1. The image uploaded has/had the right size of 1800x600px. It looks pixelated on the front-end now.
Screen 2. Upon opening one can see the image was somehow resized to the small image field size (678x300px)
3. If try to change the image to a big one from WP Gallery - downsized again.
Please fix, thanks
Please update to the latest version
It's out of date...
Plugin conflict
When I met this amazing plugin I decided to add it immediately to my boilerplate. However when using this plugin I realized that after cropping ACF-Image-Crop renames files that have already been renamed.
Did I do something wrong? Can you fix it?
Thanks!
Crop type
The crop type value doesn't update.
Crop "lightbox" issues
z-index problems with "add media", "visual", "text" buttons, and sidebar.
also when i have a narrow long crop I can't access anymore the action buttons
see screenshot here: https://www.dropbox.com/s/qt16nzex396jhqi/Screenshot%202014-04-19%2014.48.47.png
Idea - check if size is equal size of crop, if yes, dont show modal box with crop
as title of issue :)
Still Maintained?
Is this plugin no longer maintained?
If not, are any other good alternatives anyone can suggest?
Thanks!
Scott
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.