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

Blog banner image and blog post image does not appear in the "Media" section in Umbraco back-office. #339

Open
frederiktoft opened this issue Jul 3, 2020 · 19 comments

Comments

@frederiktoft
Copy link

frederiktoft commented Jul 3, 2020

Using Umbraco 8.6.3 and Articulate 4.1.2.
As the title says, when adding an image to a blogpost og the main blog banner image, the images are correctly stored in the media folder, but they do not appear in the Media section of Umbraco back-office. Also if you remove one of those images from a post, and want to use it again, you will have to upload the image one more time.

@Shazwazza
Copy link
Owner

Hi, yes it would probably be nicer to have a media picker instead of having the upload field directly on the content item. Umbraco's upload field doesn't mean that it's going to be in the 'media' section. Content and Media are really the 'same' type of thing, both have content types with properties so it's relatively common that some Content Types have upload or image cropper properties on content items. The files will physically be stored in /media but the data is stored with the content item.

Happy to change upload/image cropper controls on the Articulate content types to media pickers and have the media controlled by the picker. I've marked this as help-wanted, if you have time to help with this that would be great else i'll try to find some time in the next month or 2.

@frederiktoft
Copy link
Author

Ok that explains it better :) I thought it was partly a bug and a limitation, because as I was making blog posts, deleting them and testing it, it sort of felt like the images where "lost in the void" for a lack of a better term. It was difficult to figure what images was used where and being able to reuse or edit them. If it is currently working as intended then obviously it is not a bug, but then consider this asking for an enhancement, if it makes sense to do of course.

@Shazwazza
Copy link
Owner

Yep i think it would make sense. We'll see if anyone is able to pick it up, else i'll see what i can do when i find some time.

@poornimanayar
Copy link

@Shazwazza I can give this a try :-)

@frederiktoft
Copy link
Author

@Shazwazza I can give this a try :-)

Yes please you are welcome to try :) implementing support for language variations will be a big help.

@Shazwazza
Copy link
Owner

@poornimanayar 🎉 sounds great let me know how you go and any questions. If you get caught out by anything would be worth submitting a PR with where you got to and we can work in it from there.

@poornimanayar
Copy link

Hi @Shazwazza ,

I have made a start on this. The way I am approaching is by changing the Post Image to a "Media Picker" item in the Articulate Post doc type. So that we can still make use of the crops I am changing the Image Cropper in the Image Media Type to Articulate Cropper which means we can replace all instances of Articulate Cropper property types in various doctypes to use media picker. Am I moving in the right direction?

image
image

Poornima

@poornimanayar
Copy link

Apologies if I am overthinking it, blame my imposter syndrome 🙈

@poornimanayar
Copy link

On second thought, latter wont work. I knew I had overlooked something. Can we specify the crop on the Image Cropper itself?

@Shazwazza
Copy link
Owner

Yes this is the real issue that many people including myself have been needing from the CMS for years. We need a cropper media picker, otherwise it's kind of useless. The only other way would be to create a new media item type like ArticulateImage and then use the Articulate Cropper as it's media item data type so we can still use the Articulate Crop sizes.
I'm unsure what repercussions that would have but might be the only viable solution. Does that make sense to try?

@poornimanayar
Copy link

Hey @Shazwazza , Yes thats one option. Or another is to specify the crops on the out-of-the-box Image Cropper itself. I am thinking aloud here. So what we have is potential users of the package on a live website. They might already have the package installed and wish to upgrade, or they might be using this as a fresh install. So thats the two test cases I have in mind. Let me put together something on this lines as a PR. I donno whether I see a breaking change here (insert worried face here)

@Shazwazza
Copy link
Owner

I guess my concern about specifying Articulate crops on the built in Cropper (part of the standard Image media type) is that this is quite intrusive since people can already have their own crops defined there and for different parts of the site and be using the standard Image media type/cropper for all sorts of existing purposes and modifying that might be a problem. For new sites this would also force the default image/cropper to be Articulate specific. I feel like just having a custom Articulate Image media type with the Articulate Cropper data type (which already exists) would be the most flexible and least intrusive?

@poornimanayar
Copy link

Makes total sense @Shazwazza . Let me see if I can get this working :-) I will report back on any more findings here. Watch this space :-)

@poornimanayar
Copy link

Hi @Shazwazza ,

I spend some time on this today. Here are the steps I took

  1. Created a new media type called ArticulateImage with Articulate Cropper as the data type
  2. Tried changing the Post Image field to a media picker. This was making the field in the content totally uneditable wherever there was media item selected (in the posts already included out of the box) . So I added a new field called Articulate Image with a media picker as the underlying data type
  3. I have got it working on the VAPOR theme. Trying to work on the other themes too.

I am going to raise a WIP PR to show my progress. Can you check and let me know if I am on right path? I have left the PostImage in the PostModel intact for now as I want to get it working on all themes first before I go back and clean up. Right now I am thinking how I can get the ImageCropperValue from ArticulateImage to return along with my PostModel so that I can use in other themes.

image

@Shazwazza
Copy link
Owner

Hi @poornimanayar ! I'll try to have a look tomorrow and get back to you 🤞

@poornimanayar
Copy link

No pressure Shan.

@frederiktoft
Copy link
Author

Any updates on this?

@Shazwazza
Copy link
Owner

Ho sorry, this is a very large change and haven't had time to do any reviews.

@Shazwazza
Copy link
Owner

@poornimanayar started some work here #342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants