Why is it important?

At the moment there is no way to turn this off, which may result in unnecessary libraries being loaded, and they will by default have a higher priority than the software that comes with the libheif, what will cause a very tricker debug why for specific cases your code work not as expected.
Also from security reason this is not a good way to load a libraries from path that you cannot control.

This can be implemented s as a flag in heif_init or as a compile-time flag.

From my pow, the environment variable “LIBHEIF_PLUGIN_PATH” is ok; it is not necessary to cancel loading from it, because if you really need, you can just remove it or make empty before calling heif_init, so at least here control for what can be loaded is present.


-----

Also, in order not to create a small question(perhaps the answer should be put in the readme), what will happen in such a situation:

1. Libheif loads version 1.0.0 of the XXX encoder during `heif_init` (for example such encoder is in LIBHEIF_PLUGIN_PATH)
2. After this, a call occurs to `heif_load_plugin` on version 1.1.0 of the XXX encoder that are in a separate custom folder

What the expected as a result in this situation?
Provide a way to disable automatic loading plugins from LIBHEIF_PLUGIN_DIRECTORY
This is a GitHub Issue
repo:libheif
owner:strukturag
Title : Provide a way to disable automatic loading plugins from LIBHEIF_PLUGIN_DIRECTORY
Issue date:

--- start body ---
Why is it important?

At the moment there is no way to turn this off, which may result in unnecessary libraries being loaded, and they will by default have a higher priority than the software that comes with the libheif, what will cause a very tricker debug why for specific cases your code work not as expected.
Also from security reason this is not a good way to load a libraries from path that you cannot control.

This can be implemented s as a flag in heif_init or as a compile-time flag.

From my pow, the environment variable “LIBHEIF_PLUGIN_PATH” is ok; it is not necessary to cancel loading from it, because if you really need, you can just remove it or make empty before calling heif_init, so at least here control for what can be loaded is present.


-----

Also, in order not to create a small question(perhaps the answer should be put in the readme), what will happen in such a situation:

1. Libheif loads version 1.0.0 of the XXX encoder during `heif_init` (for example such encoder is in LIBHEIF_PLUGIN_PATH)
2. After this, a call occurs to `heif_load_plugin` on version 1.1.0 of the XXX encoder that are in a separate custom folder

What the expected as a result in this situation?
--- end body ---
