Hot answers tagged

1

You can do this automatically by creating your own text filter in a custom module. Note that the /** @Filter ... */ in front of the class is not a comment, but an annotation, it has to be included in the file. Replace all fancy uppercase stuff with your own code. src/Plugin/Filter/MYFANCYFILTER.php <?php namespace Drupal\MY_MODULE\Plugin\Filter; use ...


1

In Drupal 8 you can use the file_url_generator service Drupal::service('file_url_generator')->generateAbsoluteString($uri) Because the file_create_url($uri) function is deprecated: https://www.drupal.org/node/2940031


Only top voted, non community-wiki answers of a minimum length are eligible