-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically pull in alt-text from original image #71
Comments
Hey @dylantuohy thanks for the suggestion. That would actually create another issue as far as I'm concerned, namely duplicate contact that would then have to be updated if the original changes. WordPress currently shares alt-texts between image sizes because logically there are very few reasons (outside of very specific art-direction) that you'd want different alt-text for different images, so I can't see why one would want to copy text over when it should actually remain connected to the original image's meta data. |
Hey, thanks for the PR. I'm thinking of including this feature in the next major version of the plugin. I like this approach better than copying the values. I'll probably add an option to enable and disable this functionality. I have just a few questions. With the It's possible to overwrite the values so that cropped image has different meta information than the original, right? |
Hey @joppuyo I'm glad to hear this might be helpful! From my experience so far, it looks like As for overwriting the values, it should only attempt to fecth the original alt if no alt text is present on the cropped image, so that shouldn't be an issue at all. |
Wordpress uses the same photo data when it has users crop images. Since the image topic is typically the same or similar the user would appreciate the head start on editing what was there. Please add this feature. |
I personally need the description for my purposes and would appreciate this. |
Hey, unfortunately I haven’t had very much time lately so progress on the plugin has been a bit slow. However, right now I’m focused on the new version 7.0.0 of the plugin which is a partial rewrite of the plugin. The current code of the plugin is a bit of a mess and after the version 7.0.0 is complete, it will be much easier to add new features to the plugin. I’m pretty sure I will be able to complete the rewrite in upcoming months and after I can focus on new features such as this. I acknowledge that it would be nice to have this feature as soon as possible but it wouldn’t make much sense to add features to the current codebase because it’s in need of major improvement right now. |
Thanks for responding. Is there an email list I can subscribe to so I know when it is ready or if you need testing?
James
…________________________________
From: Johannes Siipola ***@***.***>
Sent: Saturday, August 13, 2022 9:49:08 AM
To: joppuyo/acf-image-aspect-ratio-crop ***@***.***>
Cc: James Kennedy ***@***.***>; Comment ***@***.***>
Subject: Re: [joppuyo/acf-image-aspect-ratio-crop] Automatically pull in alt-text from original image (#71)
Hey, unfortunately I haven’t had very much time lately so progress on the plugin has been a bit slow. However, right now I’m focused on the new version 7.0.0 of the plugin which is a partial rewrite of the plugin. The current code of the plugin is a bit of a mess and after the version 7.0.0 is complete, it will be much easier to add new features to the plugin. I’m pretty sure I will be able to complete the rewrite in upcoming months and after I can focus on new features such as this. I acknowledge that it would be nice to have this feature as soon as possible but it wouldn’t make much sense to add features to the current codebase because it’s in need of major improvement right now.
—
Reply to this email directly, view it on GitHub<#71 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAHEOQ3TQFZEGAAGLRG422TVY6RVJANCNFSM47UNHOKA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I will be updating this ticket when there’s progress on this issue so you should get a notification since you are participating in this issue. |
In your development on the new version. Are you creating a feature for front end editing like this: https://fengyuanchen.github.io/cropperjs/ where the user does not have to leave the page to crop. Right now users have to go to the backend, open media gallery or modal window click multiple times then save and then revisit the page to get a look at what they did. This is way to cumbersome. It would be great if the user could have a visual of the entire page on the front end and see how it looks with the proposed cropped version, before actually cropping the image. If the user doesn't like how it looks they can reset the cropped view to what was there before, then when they like the look click crop. There is no reason to have to restore an image to previous state until after they actually crop it. The open in modal or visit the media gallery and click multiple times save and then revisit the page is way to cumbersome. |
Hey, this kind of functionality sounds so complicated it's out of scope for this plugin. Have you tried to use this plugin in conjunction with ACF blocks? This would allow you to see the field controls in the sidebar and a preview of the element inside the block editor. |
I did not but will check it out. Could you allow users to crop on the page instead of having a pop-up screen? |
Since this is an ACF field, I'm limited by the way ACF works. That's why it's not possible to build this sort of integration with the front end. I'm not planning on moving the cropper "inline" on the page because there simply isn't enough space for it. The modal allows the image to take up the entire screen which makes the cropping process easier. I think ACF blocks would be your best bet for previewing how the image looks in the context of a particular element. |
Is this the resource on how to implement this solution: https://www.advancedcustomfields.com/resources/blocks/ |
Yes, this is the functionality I'm talking about. If you need more support with this, I would recommend opening another ticket since this isn't related to the alt text that this issue is about. |
Done, sorry for making a mess! |
As pointed out here, this could cause more issues than it solves in my opinion. We always have |
I can't think of many use cases for having different alt-text for different image sizes, or for different aspect-ratios, for that matter. Therefore I'd suggest adding a hook directly to
wp_get_attachment_image_attributes
that checks for missing alt-text and attempts to set the alt-text directly so the image tag displays as expected.Below is an example of such a function:
The text was updated successfully, but these errors were encountered: