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

RAW files (.CR2) not shown in Photos app but are shown in Files app. #530

Open
Skeebopstop opened this issue Nov 2, 2020 · 16 comments · Fixed by #844
Open

RAW files (.CR2) not shown in Photos app but are shown in Files app. #530

Skeebopstop opened this issue Nov 2, 2020 · 16 comments · Fixed by #844
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@Skeebopstop
Copy link

Photos does not show previews of mimetypes from Camera RAW previews. The 'Files' app shows the previews properly (NOTE: I generated them using preview-generator), when I click on .CR2 etc.. from the 'Files' app it opens them in the preview viewer. When I switch to 'Photos' app, none of them show up (and folders which have purely CR2 are not shown at all).

Desktop (please complete the following information):

  • OS: Raspberry pi stretch
  • Browser Chrome
  • Version 86
@Skeebopstop Skeebopstop added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Nov 2, 2020
@skjnldsv
Copy link
Member

skjnldsv commented Nov 2, 2020

Hi, Photos only supports jpeg and png for now.

@jancborchardt any insights? Would it make sense to add cr2? Do people really use raw that much?
I guess we don't really lose anything to add them 🤔

@Skeebopstop
Copy link
Author

I'm quite certain Camera RAW previews app is a very popular one, I use it in conjuction with preview-generator. I guess my main confusion is, why wouldn't the Photos app be using the image mimetype to determine if it should display a preview or not, rather than looking at file name extension? After all, an image is an image which is a photo :)

@skjnldsv
Copy link
Member

skjnldsv commented Nov 4, 2020

That's huge debate :)
But mimetypes are linked to files extension, that doesn't change a lot.
Nonetheless if we show all files with a preview that is not a photo app (pdf, text, anything that have a preview provider)

So we have to draw a line somewhere 🤷

@Skeebopstop
Copy link
Author

I didn't think .txt and .pdf etc.. would be registered as an 'image' mimetype and rather text/pdf or text? I just thought they'd have registered with a preview provider? Isn't there a difference?

@skjnldsv
Copy link
Member

skjnldsv commented Nov 5, 2020

Yes, they will be seen as their associated mimetype: application/pdf
Sorry, I might have misunderstood you? You said:

why wouldn't the Photos app be using the image mimetype to determine if it should display a preview or not, rather than looking at file name extension

I answered that we need to filter the mimetype before even having to check if a preview exists before.
Using extensions or mimetypes to filter are pretty much the same :)

@Skeebopstop
Copy link
Author

ok, I'm not sure what is best, it just seems to me that if something has a mimetype of 'image' (whether pdf or not) and has a preview provider registered, it should have all the appropriate sized preview jpegs generated for it and thus why not display it? It's just the presentation in the photos app which I really like, it's nicer than files when navigating huge servers with lots of files and folders.

I'm ultimately just keen to see .PSD and .CR2 as for photographers it's quite important, however it seems harder to maintain it that way. Perhaps a setting that's off by default is perhaps better to enable Photos to display all mimetypes with preview providers registered.

@skjnldsv
Copy link
Member

skjnldsv commented Nov 5, 2020

Perhaps a setting that's off by default is perhaps better to enable Photos to display all mimetypes with preview providers registered.

That would defeat the entire purpose of photos. This would just be a files replacement. 🤷
I can already tell you this will not happen. Nonetheless expanding the list of images for photos editors/photographers is a nice idea! 👍

@TurkeyMan
Copy link

TurkeyMan commented Nov 24, 2020

My entire photo library is raw images.
Photos is practically useless to me unless it's possible for the Camera RAW plugin to be able to inject its supported formats to the whitelist somehow.
I agree it should not be that any mimetype that can be previewed shows in photos; I don't want PDF's and junk in my albums, but every format supported by Camera RAW is guaranteed to be a 'photo' (because that's what digital cameras do!), and it needs to be possible for that plugin to extend the whitelist of formats to include the formats it handles.

@ariselseng
Copy link
Member

What about whitelisting all mimes with prefix "image/" that has a preview?

@boecko
Copy link
Contributor

boecko commented Aug 6, 2021

Actually this is an one-liner PR.
But IMHO the list of mimetypes for Photos should be configurable

@Wivik
Copy link

Wivik commented Sep 4, 2021

Actually this is an one-liner PR.
But IMHO the list of mimetypes for Photos should be configurable

Hello,

I've tried your fix for Nikon NEF files, but nothing in Photos.

In apps/photos/lib/AppInfo/Application.php :

       public const IMAGE_MIMES = [
                'image/png',
                'image/jpeg',
                'image/heic',
                'image/x-nikon-nef', // added this
                'image/tiff', // and added that
                // 'image/gif',                 // too rarely used for photos
                // 'image/x-xbitmap',   // too rarely used for photos
                // 'image/bmp',                 // too rarely used for photos
                // 'image/svg+xml',             // too rarely used for photos
        ];

Did I missed something ? I'm not a dev, but if it could help to support these files.

@skjnldsv skjnldsv reopened this Sep 6, 2021
@skjnldsv
Copy link
Member

skjnldsv commented Sep 6, 2021

Aaaah, I was too fast.
I forgot that those previews are actually provided by the ariselseng/camerarawpreviews app.
Meaninng if it's not installed, the photos app will wtill display the CR2 files, so that's not good.
What we need is nextcloud/server#22873

So we can get the list of mimes that nextcloud supports, instead of relying on this hardcoded list.

@boecko
Copy link
Contributor

boecko commented Sep 8, 2021

Or, you could just let the user decide, which mimetypes he wants to see, regardless wether the plugin is installed or not.

IMAGE_MIMES + config-value

When nextcloud/server#22873 is implemented, you can change that.

@adi2k5
Copy link

adi2k5 commented Sep 13, 2021

One thing to consider here is, what and how will be displayed when there will be both CR2 + JPG in the same folder. It would be nice to have only one of them being shown in the preview (probably jpg would be better pick in that case, as it's much smaller thank CR2 and thus full picture will load also much faster), unless there will be a way to configure that. Otherwise we'd get doubled previews of photos and much worse loading times every second file. If I recall properly, the same problem is present ie. in gwenview from KDE, but that one can be at least solved with running 'gwenview *.JPG", on nextcloud instance that would be much bigger problem.

@boecko
Copy link
Contributor

boecko commented Jan 14, 2022

Could you just please extend the f***cking IMAGE_MIMES list with image/x-dcraw like I did in my patch.?

When you happen to not have the Camera RAW Previews-app installed, a message is displayed, that the image is not previewable.
So what? People who make pictures in RAW, will figure out that they need to install the right App.

On the other hand. People who make RAW photos might not be devs and don't want to wait months before someone fixes core.

Most photographers don't care about RAW+JPG. We have cRAW now.
My workflow with a Canon EOS R6.
Fire up FTPs-Connection to proftpd .. exiftool figures out the Path -> eg 2022/01/14 -> visible in nextcloud ... if Photos has image/x-dcraw in IMAGE_MIMES

@boecko
Copy link
Contributor

boecko commented Jan 14, 2022

Aaaah, I was too fast. I forgot that those previews are actually provided by the ariselseng/camerarawpreviews app. Meaninng if it's not installed, the photos app will wtill display the CR2 files, so that's not good. What we need is nextcloud/server#22873

So we can get the list of mimes that nextcloud supports, instead of relying on this hardcoded list.

this will not happen in the near future ...
Just add the line.

CR2,3-Users will care
JPG-Users will not notice it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants