HI everyone,
I am using the latest release of elgg 6
I don't know if this is a bug or a misunderstanding.
I upload icon to an entity this way.
$entity->deleteIcon();
$entity->saveIconFromUploadedFile('og_image', 'open_graph_image');
When I try to display the icon this way, nothing is displayed.
elgg_view('output/img', [
'src' => $entity->getIconURL(['type' => 'open_graph_image']),
'class' => 'elgg-photo elgg-field',
]);
But when I change "open_graph_image" by "icon" it works.
It works this way.
$entity->deleteIcon();
$entity->saveIconFromUploadedFile('og_image', 'icon');
Then
elgg_view('output/img', [
'src' => $entity->getIconURL(['type' => 'icon']),
'class' => 'elgg-photo elgg-field',
]);
Could someone help me ?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Jerome Bakker@jeabakker
Jerome Bakker - 1 like
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
You must log in to post replies.Do you have sizes configured for your ' open_graph_image'?
check out https://learn.elgg.org/en/stable/guides/events-list.html#other and then the 'entity:<icon_type>:sizes, <entity_type>' event
Thanks ... it works now with configured 'open_graph_image' sizes