How do I get the path to a directory of an image file and how do I get the name of the image? I am new to Drupal and new to twig. I am currently using Drupal 8.1.1. I would like to obtain two things, the directory path of the image and the image name. I can get the path to the image using twig:  {{ file_url(content.field_image['#items'].entity.uri.value) }}   Is there a way to do this? For example, I get /path/to/image.jpeg using file_url(), is there any function to return /path/to, the path to the image directory and the image name?
Get the image URL I want to render an image as a background image via an inline style in twig. I created a field called bg_image and attached it to the standard plain page.  After fiddling around for hours I was able to get the Image URL in node.html.twig  {{ file_url(node.field_bg_image.0.entity.uri.value) }}   but I could not get it to work inside field--field-bg_image.html.twig  Can I get the node from there anyhow, so I can then get the image?  How can I get the image URL to use as inline style? I thought maybe I can pass a variable from field--field-bg_image.html.twig to image.html.twig and then just render  {{ uri }}   instead of  &lt;img{{ attributes.addClass(classes) }} /&gt;   but I could not get it to pass the variable there unless I use includes  {% include 'image.html.twig' with {'image': image, 'isFromField': isFromField} %}   (isFromField is true, when it comes from the field--field-bg_image.html.twig) But that didn't work either. The Image was never rendered that way.  Would be very glad if you can help - my php knowledge is very basic. Thanks
Is there a way to format a UTC time into any arbitrary string format I want in java?  Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me.  Is there a way to do this? Construct ideals in $\mathbb Z[x]$ with a given least number of generators On which Stack Exchange site should I post subjective questions? a / an - adjective - noun The article a becomes to an when the following noun starts with a vowel.     Not a adventure but an adventure.   But how is it, when there's an adjective before the noun?     Not a thrilling adventure or not an thrilling Adventure?   And how is it, when the adjective starts with a vowel but the noun does not?     Not a exciting tournament or not an exciting tournament? How to submit webform programmaticaly? If $m$ divides $n$, find a free resolution of $\mathbb{Z}/m$ as a $\mathbb{Z}/n$-module. If $m$ divides $n$, find a free resolution of $\mathbb{Z}/m$ as a $\mathbb{Z}/n$-module.   I have tried this one and got $0 \leftarrow \mathbb{Z}/m \leftarrow \mathbb{Z}/n \leftarrow \mathbb{Z}/n$.  The map $\mathbb{Z}/n \to \mathbb{Z}/n$ is multiplication by $m$, but I couldn't go further. Please help me. Is there any difference between the usage of 'later' and 'later on'?         I'll see you later.   I'll finish it later on. Strange bar plot alignment in Pandas What is the easiest way to update/upgrade an offline Ubuntu machine with the help of a Windows machine that has internet access?  This question also applies to installing new packages offline and not only updates/upgrades.  The Linux system shall remain completely cut off from the Windows machine, meaning there should be no ethernet connection or the likes between the two computers.  Update:  Please have patience, since I haven't updated this since two weeks. There are some complications getting apt-offline to work properly on Lubuntu and all other methods seem to be too old and deprecated:  AptOff - last update 2006 AptMedium - last update 2007 Keryx - last update 2011, looks like this project was discontinued  I hope I will be able to somehow update the offline machine, finally.  While I was still not able to update/upgrade the offline system due to authentication errors, I accepted an answer, because it's taking too long. Does this parallel structure need coordinated prepositions to avoid being a faulty parallelism? Integrating radial free fall in Newtonian gravity Are any fictional worlds available in some GIS format? Is there any fictional world (e.g. ,  etc.) which could be used in a GIS context?  For example, an MBTiles archive and a shapefile or any other format usable with OpenLayers / Polymaps / Leaflet? Recovering Home folder after failure to boot I have a small issue. I was having some issues in getting some libraries to work and to resolve it, i deleted some shared libraries by mistake(sudo ...).Now ubuntu fails to boot up but i can access the files from recovery mode. I can see my home folder intact but i cannot even run sudo nautilus as it says it shared libraries not found. The data in my home folder is quite important and i want retrieving it is important. I am running a windows dual boot, if it helps. If anyone could help copy the home folder to a windows drive from the terminal itself(as i can access it at recovery mode) it would be of immense help. Thanks.:-) This is a question that's been nagging me for some time. I always thought that C++ should have been designed so that the delete operator (without brackets) works even with the new[] operator.  In my opinion, writing this:  int* p = new int;   should be equivalent to allocating an array of 1 element:  int* p = new int[1];   If this was true, the delete operator could always be deleting arrays, and we wouldn't need the delete[] operator.  Is there any reason why the delete[] operator was introduced in C++?  The only reason I can think of is that allocating arrays has a small memory footprint (you have to store the array size somewhere), so that distinguishing delete vs delete[] was a small memory optimization. How to type special/accented letters in LaTeX? How to type these special letters from European languages in latex? ä, é, and L'? So, for my science fair I had to test the gauge of a copper wire vs electrical resistance. What I did was I set up a series circuit involving a 6v battery, a light bulb, a multimeter, and a voltmeter. I would change out three different wires with three different gauges.   For the 4-gauge wire, I got 0.004V and 0.04A. For the 8-gauge wire, I got 0.003V and 0.04A For the 12-gauge wire, I got 0.001V and 0.04A.   In this experiment, what would the independent and dependent variables?  We also have to fill out a table like this: How can I set the drawableRight resource via code? Matryoshka words Resource for Blender addons? Shutdown button only logs out ubuntu 15.04