Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [assets]

Files managed by Craft, stored in physical folders or (with Craft Pro) on Amazon S3, Rackspace Cloud, and Google Cloud.

1
vote
1answer
9 views

some assets have volumeId set to NULL in database

I noticed that some of my assets have volemeId column set to NULL in the database table assets. Is it normal? Should I attach them manually to some volume?
2
votes
1answer
20 views

Plugin that lets user select focal point/cropped area

I would like to let the editor of a specific entry select the focal point and cropped area each time she selects an asset for an asset field. How can I achieve that? I know about the built in ...
1
vote
0answers
26 views

How do I correctly upload a new Asset from a temp file I generated from a service method?

Preamble Craft 3.1.26 PHP 7.2.8 on Mamp Pro 5.1.1 I browsed to my storage/reports folder and made sure in Finder than full read/write privileges are granted. What's goin on I have a module with a ...
0
votes
0answers
13 views

Asset subfolder dynamic condition

I have a channel called Locations. I've created a matrix field to hold x amount of team members. I have the asset folder for the team member's picture saved to locations/{owner.slug}/team I would ...
0
votes
1answer
30 views

An unknown error has occurred in asset reindex

I am getting the error: An unknown error occurred for each file in a folder when I try Update Asset Indexes. The folder is a local folder that is outside of webroot. The files just contain json data....
2
votes
0answers
18 views

Multi-site - Setup remote asset volume to store assets on a per site/folder basis

We've got a Craft 3 (3.1.25) multi-site setup with three sites: Corporate (default) Brand A (brandA) Brand B (brandB) For this install there's 3 users setup with the following access to the sites. ...
0
votes
0answers
22 views

When trying to create a new asset volume, I don't have the form line where to put the path

As per the question, see the included screenshot: I just don't have the URL form to type where the volume should be on the server.
1
vote
1answer
32 views

Assets Error: Unknown or bad format (years) at position 0 (y)

I am getting a new error, after no apparent updates from me or the client. The error only appears on pages with this one particular field. "DateInterval::createFromDateString(): Unknown or bad ...
1
vote
1answer
35 views

Error creating new volume

When creating a new volume (same process as the other 3 volume I currently have and which are fine, I'm running into the following error). Any help would be appreciated.
1
vote
0answers
47 views

How to download private assets (without public URL) from dashboard

I would like to download asset files from Craft 3 dashboard. Those files are out of web folder because of security reason. I made "documents" folder just under the root of the project, and the files ...
0
votes
0answers
28 views

Assets uploaded image quality is terrible

When I upload a JPG image through Assets, the image quality is terrible. I dont mean a slight difference for web optimisation, but I mean REALLY bad! See screenshot. Can't find any helpful about ...
1
vote
0answers
17 views

Asset field - saving assets with dynamic subfolder by categories not working consistently

I have two asset (image) fields in project entry type, both with the same setting and with different outputs… Anyone knows why? Thanks My fields are: intro image field gallery image field Both ...
1
vote
1answer
22 views

Advice on entry form file uploads and S3

Just planning out an entry form that includes a file upload field – an assets field hooked up to an S3 bucket. I see some documentation on entry form assets here, but need some advice on getting this ...
1
vote
1answer
32 views

Craft “Embedded Assets” Plug-in didn't save Embed in selected Asset Volume in CP

i have 3 asset volumes in my craft install (3.1.5). If i want to create an embedded asset(Embedded Assets Plugin 1.0.2) in the first volume (CP) in my volume List than it appears in the second. Every ...
2
votes
0answers
40 views

Move an asset to another volume with volume specific OptimizedImages Field and on the entry a volume restricted Asset Field

I have three volumes: content, hero and overview. Each volume has his specific OptimizedImages Field(s). Asset Fields are restricted to its specific source volume. For example: A Super Table Field ...
1
vote
1answer
40 views

Restricting file size for an Assets Volume

I have a use case where I want to limit the allowed file size for a certain Assets Volume to 20kb. All other volumes should be allowed files no matter the size. I have looked at some other threads ...
1
vote
2answers
20 views

Merging Assets Fields

I've got this working but it seems terribly verbose to do something, that in my opinion should be easier. Is there a better way to get the assets from 2 different fields, merge them and output them ...
1
vote
1answer
51 views

Assets are not loading anymore (maybe an update)

I just noticed that I can't see my files if I go into the assets section. An Error blinks up and says "An unknown error occurred". In the front-end, I see every file and I can upload files to an asset ...
1
vote
1answer
28 views

Is there a way to reset the focal point in Craft?

As the question states. Is it possible to reset the focal point in the CMS? I cannot see any obvious setting? If not could this perhaps be a feature request for a reset focal point button?
0
votes
0answers
69 views

Broken Asset Previews/Transforms

The asset previews in my CP are displaying as broken, and certain image transforms on the front-end template are broken. If I preview a file in the Assets panel it displays fine, so it seems to be a ...
1
vote
0answers
26 views

Image Store Issue

Dear Craft Users/Developers We have inherited a customer on our server platform using CraftCMS 2.7.4. They had their site before moving to us hosted with images using Rackspace via the CraftCMS Pro ...
1
vote
1answer
52 views

Craft 3 - Moving assets between folders causes apache connection to max out

In Craft 3, I keep running into an issue when I try to move a large amount of files (around 200) by dragging and dropping from my “Holding” folder into a “Live” folder using Craft Assets section. Both ...
0
votes
0answers
68 views

Cache Busting: Server not ignoring Static Assets Version Timestamp String?

I'm trying to get cache busting working using Andrew's amazing scaffold for Craft CMS. Craft is requesting the timestamped assets but they are not loading. For example, the stylesheet is requested ...
0
votes
1answer
79 views

Can't link to entries or assets via a Redactor field

When using a Redactor field for a section, I can’t upload assets or link to entries. I just get an empty modal with no ability to select a section or asset folder. Thoughts on what I’m doing wrong? [...
1
vote
1answer
27 views

Route directly to an S3-hosted asset?

I have a multi-site Craft install. I'd like to offer the ability for each site to upload an icon that will be used for favicons. I noticed a lot of 404s for both /favicon.ico and /apple-touch-icon....
1
vote
1answer
75 views

Amazon S3 Images not showing up in Assets

I'm developing locally and adding images to my Amazon S3 bucket. I have the same connection to the bucket on my remote environment. On my local environment, I can see the images I've uploaded, but on ...
1
vote
1answer
52 views

How do I delete an asset with module or plugin

I'm trying to clean-up the assets in a specific folder that aren't being used at all, i.e. aren't related to anything. I got the list O.K. just using this $assets = Asset::find()->volume('artists'...
1
vote
2answers
112 views

How to browse uploaded assets on the front end?

I have a frontend entry form which included a file field to upload files to the entry. All works fine. I even have a delete function to remove individual uploaded files from the entry. The problem ...
2
votes
1answer
32 views

ImageOptimize not using image url specified in my multi-environment setup and my volume config

When I output my ImageOptimize field in the template, my images are not showing up. If you inspect the image url, it's missing a folder name I'm specifying as part of the url in my multi-environment ...
1
vote
1answer
130 views

Assets page “An unknown error occurred”

I'm suddenly unable to load my site's assets page. All of my asset sources are local, and loading the main assets page or any source folder or subfolder results in "An unknown error occurred." being ...
0
votes
1answer
41 views

Displaying related image assets from another section with twig

I have a site that shows upcoming football matches in a table, and I would like to include the clubs' logos next to each club name. I have the following sections and entry types, both generated using ...
1
vote
1answer
26 views

Is it possible to search an asset filename stored on a remote Amazon S3 volume?

I'm successfully using the .search element attribute to search asset filenames stored locally. {% set mediaExists = craft.assets.folderId('6').search('filename:' ~ vLogID|slice(0, 5)) %} Is it ...
1
vote
2answers
425 views

Craft 3 Plugin Development: Add CSS and JS File to Frontend Templates

How do I add js and css files to frontend page loads via a plugin? I did reference this issue: Can a plugin add JS or CSS to the control panel? but that is for Craft 2. Reading the docs here: https:/...
0
votes
1answer
307 views

Craft 3 - Save new Entry with Relations (Categories/Assets)

i simply can not get my "job" done. I try to create a plugin for Craft, a simple one. It reads some date and should create new entries out of this data. First i stuck on a stupid save-mistake, someone ...
0
votes
0answers
77 views

Large file upload, 500 server error

We've a Craft 3 site hosted with Digital Ocean (Serverpilot set-up) with the DNS routed through Cloudflare. The client has experienced issues uploading large ZIP files to (c140MB), returning a 413 ...
0
votes
1answer
190 views

Craft 3 auto-creates sub-folders in assets. How can I prevent this?

I use Google storage for photos. The Google storage volume is mapped to a bucket's subfolder. Unfortunately these appear as subfolders in assets, along with a set of repeated folder structure. I did ...
2
votes
1answer
28 views

Multiple Asset source question

I'm creating a new Craft 3 site and migrating a lot of content from a wordpress setup. I'm wondering if it is better to separate assets into more sources - thus reducing the number of files per ...
1
vote
1answer
34 views

Sideloading an image from a function in a plugin

I need to be able to side load an image and attach to an entry. My image is coming from an external url... such as http://someplace.com/image.jpg - i can store this in a temporary file so its locally ...
2
votes
1answer
88 views

How to rename filename of asset before (or after) upload in Craft 3

I want to change the filename before the file is stored, to prevent ugly, long and weird filenames uploaded by users. I've found an example for Craft 2, but because of the changes for events I can't ...
1
vote
1answer
34 views

How can I fix Image Exception error when uploading image via front-end form while Preparse plugin enabled?

I'm not sure if the issue is with Craft 3, the Preparse plugin, or me, so I'm posting here first. I have a front-end form that includes an Assets field used to upload images. The entry type contains ...
1
vote
1answer
127 views

How can I rename an asset file on upload when an entry is saved (Craft 3)?

I have an entry type that includes an Assets field. When this entry is created/saved via the CP or a front-end form, I want to rename the Asset file as follows: Entry's author id. E.g: 148 01, 02, 03 ...
0
votes
1answer
54 views

Update Asset Indexes gives “getFileList() is not implemented”

Thank you in advance for any tips on this. Barely-related-background: I made a mistake on my development machine. In gparted, I chose "ignore" instead of "cancel". This is called 'choosing poorly'. ...
1
vote
1answer
47 views

Push/Add asset to Entry by asset filename

I have spreadsheet that i'm parsing and I have available to me a Entry ID and the Asset filename. Can I add the asset to the entry by the filename? Im targeting the product entry with: $product = ...
1
vote
1answer
101 views

API - Update Asset Volume

Im trying to figure out how to move asset(s) to a different volume. Also if I move it will that affect the entries that are using the asset? Here's what im using to target the asset: $resourceImage = ...
1
vote
1answer
33 views

Permissions needed to “edit image”?

What permissions do users need in order to access the "edit image" menu in assets? Some users can't access this, but I can't see a specific permission for this listed under: Settings > Users > User ...
0
votes
0answers
42 views

Custom plugin: asset fieldtype

I have a custom plugin that uses a custom field leveraging the elementSelect fieldtype to select an asset (which is then processed on submission via a custom service). However, when I select an asset ...
1
vote
2answers
163 views

Asset integration with Microsoft Azure Storage in Craft 3

I'm developing a site using the Craft 3 and I can't figure out how to connect assets with Microsoft Azure Storage. I found plugin for Amazon S3 but not available similar plugin for azure. Any help ...
1
vote
1answer
30 views

Is there any way to replace the asset programatically?

In the CP, when we upload an image with a same name, craft will ask if we wanna keep both or replace. So in plugin, is there any way to do the replace?
1
vote
1answer
27 views

Craft strips out parenthesis in file names.

Is there any way to allow () in asset file names (ex. file(1).txt)? Craft strips it out when it saves. The only way I've found is to change it via ftp and update asset indexes. I've set ...
5
votes
1answer
263 views

How to setup assets in multi site where each site should have its own assets?

I have a setup with multi sites that are separate domains. site-a.com site-b.com I would also like to have assets separate for each site, like so: site-a.com/images/picture1.jpg site-b.com/...