Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I'm working on a module to import a Excel file and using PhpSpreadsheet class. Now, if my uploaded file is out of public://, I have no problems at all importing it. But if I have it in public://, I get PHP message: Uncaught PHP Exception InvalidArgumentException: "File "" does not exist." at File.php line 137. Line 137 throws an exception if the file is not a file, but dpm says it is. What am I doing wrong? Below is my code:
When an images are uploaded to a Drupal 8 site, they are saved to ../sites/default/files/
I've noticed the path for images is a directory based on the Image Style name. Eg. Image Style named "teaser" will have associated images saved to ../sites/default/files/styles/teaser/public
Each Image Style does the same based on style name.
1. Is this how D8 image caching works now, or have I misconfigured something?
2. What happens to the images in these dirs if the Image Style is deleted?
[SOLVED] Was an issue on my end, please disregard.
I've modified a Content Type by adding an Image field. I do not see the image field when editing content that is currently published, but the image field is present when creating new content.
Is there a way to have the new field show-up in existing published content so that I may edit to add an image?