nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.54k stars 4.08k forks source link

Rich Link Preview Extension #4264

Closed newhinton closed 7 years ago

newhinton commented 7 years ago

Hello,

ive tried to use my own logo in whatsapp-messages (and similar applications) which proved to be quite hard. I use my own theme with custom logos which i enabled in the config of my NC 11 instance.

Whatsapp uses the favicon-fb.png to preview the Nextcloud, but my own favicon-fb.png was ignored and replaced by the "normal" favicon.

By inserting

<meta property="og:description" content="*CloudName** - **CloudSlogan" />
<meta property="og:image" content="/themes/******/core/img/favicon-fb.png" />

(actually, i didnt know how to do it properly, so i hardcoded the descriptionname)

under the element in following files:

nextcloud/core/templates --layout.guest.php --layout.base.php --layout.user.php

i could get it working on all testet Messengers (Whatsapp, Telegram and richpreview.com)

Steps to reproduce

  1. Create own Theme
  2. Send Shared Link over Whatsapp(or similar app) (Optional: I used https://richpreview.com/ to verify the logo)

Expected behaviour

The default favicon-fb.png shoud be dropped in favor of the new themes one

Actual behaviour

The logo is replaced by the "normal" favicon.

Server configuration

Ubuntu 16.04 Apache 2.4.18 MySQL 5.7.17 PHP 7.0.15 Nextcloud 11.02

No external Storage No Encryption No LDAP

MorrisJobke commented 7 years ago

cc @juliushaertl

juliusknorr commented 7 years ago

This is a good starter issue.

You can access the theming values inside of the template files by using $theme->getTitle(), similar to the other link/meta tags in the header.

@newhinton Pull requests are always welcome :wink:

Is there any specific image size/format required or can we just use the favicon/favicon-touch file?

newhinton commented 7 years ago

I tried to create a Pull request: #4648

Nottt commented 6 years ago

This is also happening to me and I just use the default theme. Nothing fancy at all. I replaced the favicon-fb.png with the image I want under /core/img/.

find /opt/nextcloud -name "favicon-fb.png"
/opt/nextcloud/conf/www/nextcloud/core/img/favicon-fb.png

As you can see there is only one file of this kind. Please help me get rid of this icon :(...btw i'm on nextcloud 14.0.3