Skip to content
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

Fixes azure storage compatibility issue with classifai. #250

Merged
merged 1 commit into from
Oct 26, 2020

Conversation

ShahAaron
Copy link

@ShahAaron ShahAaron commented Oct 23, 2020

This PR resolves the compatibility issue between ClassifAI and Microsoft Azure Storage.

It would resolve #201 .

Description of the Change

When images are added through the media gallery and Azure Blob Storage is used the images are not correctly smart cropped and the alt tags are not generated. This is due to the smart cropping and tagging happening after the image has been uploaded to Azure. By adjusting the priority of the filters to make sure smart cropping happens before the alt tags are generated it means that the image is smart cropped correctly with alt tags generated before sending the image to Azure.

Benefits

New images are now added and smart cropped correctly before sending to Azure Blob Storage via the plugin https://github.com/10up/windows-azure-storage. All tags were generated correctly and the correct url generated in the media gallery.

Possible Drawbacks

The smart cropping will not work locally as it needs to be from a publicly accessible url. The image will be correctly tagged and upload to Azure but not with the smart cropped image.

Verification Process

This only works on a publicly accessible site.

  1. Add Azure Storage plugin. Activate it and go to settings->Microsoft Azure and varify the correct credentials have been added to link to the Azure Blob Container.
  2. On the "Image Processing" Classifai settings page, with credentials in place, check the "Enable smart cropping" checkbox and the "Automatically Tag Images" checkbox.
  3. Upload an image to the media gallery.
  4. Check the image is in Azure Storage
  5. Check the image has the correct Azure url in the media gallery
  6. Check Image tags have been generated correctly
  7. Add the image to a test page and insure all alt tags have been automatically generated correctly for the image

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

@ShahAaron ShahAaron linked an issue Oct 23, 2020 that may be closed by this pull request
@jeffpaul jeffpaul added the type:bug Something isn't working. label Oct 23, 2020
@jeffpaul
Copy link
Member

Pinging @rickalee in case he's able to help test/validate this PR?

@jeffpaul jeffpaul added this to the 1.6.0 milestone Oct 23, 2020
@jeffpaul jeffpaul merged commit 9a05c1b into develop Oct 26, 2020
@jeffpaul jeffpaul deleted the fix/201-azure-compatibility branch October 26, 2020 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve compatibility issue with Microsoft Azure Storage
3 participants